Momentum cluster detector
Flags a run of accelerating one-minute gains above 0.5%; at defaults it did not fire on SPY.
The detector keeps the last window closes and turns them into bar-to-bar percentage changes. It fires on the newest bar only when the last cluster_size changes are each above 0.5% and each larger than the change before, so it needs a short run of strengthening gains. The window only sets how many bars must exist before the first check; it does not widen the search, which always looks at the newest bars.
How to read it
- Markers sit on the candle that completes the run, so the strengthening gains are the candles just before each marker.
- Each marker means the last few one-minute closes each rose more than 0.5%, and each rise was bigger than the one before.
- At default settings a session with no markers is normal; the sample month of SPY one-minute bars produced none.
- A marker describes a move already under way. It does not say where price goes next.
What it outputs
- Momentum cluster
- Marks the candle where the last few one-minute closes each rose more than 0.5%, each faster than the one before.
When it fires
Fires on the candle that completes a run of cluster_size one-minute closes, each up more than 0.5% and each up more than the one before. It marks a burst already under way, not a turn. At defaults it did not fire once in the sample month of SPY one-minute bars.
Settings
- window
- Number of recent closes kept before the first check. Raising it only delays the first marker; it does not widen the search. Below cluster_size plus 1 it can never fire, since the detector needs that many bar changes.
- cluster_size
- Number of consecutive one-minute bars that must each rise more than 0.5% and each gain more than the bar before. Lower values fire on single fast bars; higher values need a longer accelerating run and fire far less often.
Pitfalls
- At defaults it did not fire once on the sample month of SPY one-minute bars, so most charts show no markers at all.
- The 0.5% threshold is hard-coded in the source, not a parameter; only cluster_size and window can be dragged.
- Requiring every bar to rise and rise faster is strict; a sharp move with one pause, or a fading gain, is missed.