Breakout detector
Marks one-minute closes that break recent highs on heavy volume and a sharp move; silent on SPY at defaults.
On each bar it takes the highest high of the 23 bars that end two bars back, and checks three things: the close is more than 0.1% above that level, the bar's volume is over 1.3 times the average of the last 30 bars including itself, and the close is up more than 0.5% from the previous close. When all three hold it outputs how far above the level the close sits, in percent, times the volume ratio; otherwise nothing is drawn. The 0.1%, 1.3 and 0.5% thresholds are fixed in the code, not settings.
How to read it
- Markers sit on the candles where the rules fire, not in a pane below the price.
- A bigger marker value means the close cleared the recent high by more and on heavier volume.
- A marker confirms the break on that bar only; it does not predict what price does next.
- A chart with no markers is the normal state: on SPY one-minute bars the 0.5% one-bar jump is rare.
What it outputs
- Breakout strength
- Percent the close sits above the resistance level, times the volume ratio, on bars that pass all three tests. No value on other bars.
When it fires
A one-minute close clears the window's highest high by more than 0.1%, on volume above 1.3 times the vol_window average, and the close is up more than 0.5% from the prior close. A sharp, volume-backed push to a new short-term high. At defaults on the September 2026 SPY sample it never fired.
Settings
- resistance_window
- Sets the breakout level as the highest high over this many bars plus three, ending two bars back. Raising it gives an older, higher level that is harder to clear; lowering it, such as 1 to 5, gives a nearby level that closes clear more often.
- vol_window
- Sets how many recent bars, including the current one, form the volume average. Raising it spreads the baseline over a longer span; lowering it tracks the last few minutes. At 1 the average is the bar itself, so the volume test never passes.
Pitfalls
- The 0.5% one-bar jump gate suits daily bars better than one-minute bars. No parameter lifts it, so loosening resistance alone may still leave the indicator silent.
- Resistance skips the latest two bars, so a high set one or two minutes ago does not raise the level the close must clear.
- The volume average includes the current bar, which dampens spikes; at vol_window 1 the volume test can never pass.