Multi timeframe alignment
Marks bars where price has drifted up on three horizons (5, 20 and 50 bars) at the same time.
For each of three windows of recent closes, the indicator averages the bar-to-bar percentage change across the window. It fires only when all three averages are positive together, so it checks for an up-drift on short, medium and long horizons at once. Despite its name and docstring, it does not measure acceleration.
How to read it
- Markers sit on candles where the average one-minute move is up across all three windows.
- On SPY one-minute bars for September 2026 with defaults, it is on for about 24% of bars, so it is a background up-trend condition, not a rare alert.
- Firings come in roughly 64 episodes a day, each a few minutes long on average.
- When a run of markers ends, at least one horizon has stopped rising; that is not a reversal signal by itself.
What it outputs
- Aligned up-trend
- True on bars where the average one-bar change in close is positive on the 5-, 20- and 50-bar windows at the same time.
When it fires
Fires on a bar where the average one-bar change is positive across the 5-, 20- and 50-bar windows together, so price has been drifting up on all three horizons at once. It marks a sustained up-drift, not a breakout or a confirmed acceleration.
Settings
- short_window
- Length of the fastest window, 5 bars by default. Raising it averages over more closes, so the short trend turns later and filters out small wiggles; lowering it reacts within a few bars but flips more often. At 1 it can never fire.
- medium_window
- Length of the middle window, 20 bars by default. A longer window needs the average move to be up over a longer stretch, so the indicator fires less often; a shorter one lets brief bursts count. At 1 it can never fire.
- long_window
- Length of the slowest window, 50 bars by default. Raising it requires the price to have drifted up over a longer span, so fewer and later firings; lowering it lets shorter rises pass. At 1 it can never fire.
- alignment_threshold
- Minimum alignment score. When all three windows are up the score is exactly 1, so any value at or below 1 gives the same chart as the default. Values above 1 stop the indicator from ever firing.
Pitfalls
- The alignment threshold does nothing in its useful range: the score is exactly 1 whenever the indicator can fire, so only values above 1 change the output.
- Despite the name and docstring, it does not measure exponential acceleration; it only checks that the average move is positive on three windows.
- It is on about a quarter of the time with defaults, so treat it as a loose trend filter; a window of 1 silently disables the indicator instead of raising an error.