Momentum strength filter
Marks bars where at least two of three rate-of-change readings are up past a threshold and RSI is in an up-trend band.
It reads three rate-of-change values, each a fractional return over its own look-back (0.005 means +0.5%), and counts how many exceed min_threshold; at least two must. It also needs the RSI input between 0.4 and 0.7 on the -1 to +1 scale, a strong up-balance that stops short of the extreme. It returns True only when both hold, False otherwise, and nothing until all four inputs have values.
How to read it
- Markers sit only on bars where the condition is True; a bar with no marker is not a bearish signal.
- A marker means momentum is up across most windows and RSI is strong but not extreme.
- When RSI runs above 0.7 during the steepest rallies, markers drop out even though price is rising.
What it outputs
- Bullish momentum
- True on bars where at least two of three rate-of-change readings exceed the threshold and RSI is between 0.4 and 0.7.
When it fires
Momentum is up on at least two of the three windows by more than min_threshold, and RSI is between 0.4 and 0.7. It means the up-move is consistent across timeframes without being overbought. On the SPY sample it fired on about 11% of bars, about 36 times a day.
Settings
- min_threshold
- The minimum fractional move each rate-of-change reading must clear to count as up (0.005 is 0.5%). Raising it thins markers to sustained rallies; lowering it toward 0 marks any up move, and below 0 also counts small down moves, so markers fire more often.
Pitfalls
- It looks only for up-moves. It never marks falling momentum and has no bearish mirror.
- It is frequent at default settings, so a single marker is weak evidence on its own.
- The name says filter, but it does not gate another signal. The 0.4 to 0.7 RSI band is hard-coded, and min_threshold leaves it unchanged.