

Shock Wave Signal – No Repaint, No Lag, No Backpainting
Shock Wave Signal leverages extreme CCI readings to pinpoint potent momentum shifts across any timeframe. It delivers concise entry markers the moment price reaches defined overbought or oversold thresholds.
Logic
The indicator computes a 5-period Commodity Channel Index (CCI) on each closed bar up to 600 bars back. A buy arrow plots when CCI exceeds +165, signaling overheated bullish momentum. A sell arrow appears when CCI falls below –165, indicating excessive bearish pressure. This threshold filter isolates only the strongest swings.
Signal Placement
Buy markers appear at the high of the triggering candle; sell markers at its low. Each arrow plots exactly once on bar close and remains fixed. There is no repaint or backpainting, and no dependency on future bars, so signal latency is limited to the bar-close processing.
Timeframe Suitability
While Shock Wave Signal functions on all timeframes from M1 to MN1, it performs best on H1 and H4 where CCI extremes align with significant trend moves. On lower timeframes, it still captures sharp bursts but may generate more frequent alerts.
Performance
Written in optimized MQL4, the script uses a static `last_bar` check to skip redundant calculations. It updates two simple buffers and returns immediately when no new bar has closed. You’ll notice negligible impact on backtest or live execution even with full history.
User Inputs
- cbars: Number of bars to evaluate (default 600).
- cci_per: CCI period length (default 5).
- cci_level: Threshold for overbought/oversold (default 165).
Adjust these to balance sensitivity and signal frequency: higher `cci_level` tightens to only extreme moves; lower it increases alerts at the cost of more noise.
FAQ
Does it repaint?
No. All arrows render once at bar close and remain fixed thereafter.
Is there lag?
Only the single-bar close delay; calculations complete immediately afterward without additional buffering.
Can I fine-tune sensitivity?
Yes. Increasing `cci_level` reduces signal frequency to only the most extreme momentum shifts; decreasing it yields more signals but may include minor swings.