Explosive profit detector
Marks rare bars where volume, range and momentum all spike at once on an up-close.
ExplosiveProfitDetector marks a bar only when four tests pass on that same bar. The current ATR must be at least atr_factor times the average of the last atr_window ATR values, the current volume at least vol_factor times the average of the last vol_window volumes, and the return over the last mom_window bars at least mom_factor times its own average. The close must also be above the previous close. Each average includes the current bar, so every test asks for a spike against its own recent history.
How to read it
- Each marker is a candle where all four tests passed together. A candle with no marker failed at least one test.
- At default settings markers are rare: 9 in the September 2026 SPY sample, about 0.4 per trading day. An empty chart is expected, not a fault.
- A marker sits on the bar that triggered it. It draws no level, target or stop, so read the price action around it yourself.
What it outputs
- Explosive signal
- Drawn on candles where the ATR, volume and momentum spikes all pass and the close is above the prior close. Each candle is either marked or not.
When it fires
All four tests pass on the same candle: ATR, volume and momentum each beat their factor, and the close is above the prior close. It means a range, volume and momentum surge coincided with an up-close. It is a spike marker, not a forecast of the next move.
Settings
- atr_window
- Sets how smoothly ATR moves (Wilder smoothing) and how many ATR values the average covers. Longer makes ATR slower to jump, so range spikes show up less often. Shorter reacts faster. The ratio cannot exceed this length.
- vol_window
- Number of bars in the average volume, including the current bar. Longer dilutes the current bar in its own average, so the volume multiple needed falls. Shorter needs a bigger multiple. The ratio cannot exceed this length.
- mom_window
- Bars back for the return, close against the close that many bars ago, and the number of returns averaged. Longer measures a slower move. If it is longer than atr_window, no markers appear until the return history fills.
- atr_factor
- How many times the current ATR must exceed its average. At 2.5 ATR must be about 2.8 times the average of the 13 values before it. Lowering it to 1.2 needs ATR about 1.2 times that average. Values above atr_window never pass.
- vol_factor
- How many times the current volume must exceed its average. At 3.0 the bar's volume must be about 3.9 times the average of the nine bars before it. Lowering it to 1.0 needs volume at or above that average. Values above vol_window never pass.
- mom_factor
- How many times the current return must exceed its average. At 1.8, with positive prior returns, the return must be about 2.25 times the average of the four before it. Lowering it to 1.0 needs a return at or above that average.
Pitfalls
- Rare by design: at default settings it marked 9 bars in the September 2026 SPY sample. The loosened presets were not measured on that sample, so check their marker count on your own chart.
- The momentum test compares ratios, not signs. When the average return is negative, a return at least mom_factor times as negative also passes, so a sharp drop with a one-bar uptick can mark.
- The ATR and volume ratios cannot exceed their window lengths (14 and 10 by default). So atr_factor above 14 or vol_factor above 10 never fires, even though the sliders allow up to 251 and 301.