Acceleration trend detector
Marks bars where the bar-to-bar price change has risen three bars in a row, with no check on direction.
AccelerationTrendDetector tracks the step from one close to the next and the change in that step, which is the acceleration of price. It fires when the last three changes in the step are all positive, each bigger than the one before, and average above 0.0005. From a window of 5 up it only reads the last five closes, so the window just sets how much history must exist before the first marker.
How to read it
- Markers only, with no line or pane: each sits on the close of a bar where the test is true.
- In a rally, a marker means the steps are getting bigger. In a fall, it means the drops are shrinking bar by bar.
- A run of consecutive markers means the pattern held for several bars; a lone marker is a single-bar blip.
- On the default SPY sample (September 2026) it marked about 0.5% of bars, roughly five a day.
What it outputs
- Accelerating closes
- True on a bar's close when the last three changes in the step are positive, each bigger than the one before, and average above 0.0005. Direction is not checked, so a slowing fall also marks.
When it fires
Fires on a bar's close when the last three changes in the step are all positive, each bigger than the one before, and average above 0.0005. It flags a rally that is speeding up or a fall that is losing momentum.
Settings
- window
- Sets how many closes must exist before the first marker, from 5 up. The rule always reads the last five closes, so a larger window does not smooth or slow the signal. Below 4 it never fires. At 4 it checks only two changes in the step and fires far more often.
Pitfalls
- Direction is not checked: a fall whose drops are shrinking marks just like a rally that is speeding up. Pair it with a trend filter.
- The 0.0005 average floor is in dollars, not percent, so at SPY's price near $765 it barely filters anything.
- A larger window does not give a smoother or slower signal, only a later first marker.