JB McClellan Oscillator
- Indicators
- Version: 1.0
- Activations: 10
JB McClellan Oscillator — Volume-Weighted Momentum with Divergence Detection
Most traders use MACD to measure momentum — but MACD only looks at price. It completely ignores volume, which means it misses the real story: who is actually buying and selling.
The McClellan Oscillator fixes this by decomposing volume into bullish and bearish components, then applying dual EMA smoothing (19/39) to reveal true momentum shifts. When price goes up on declining volume, McClellan sees it. MACD does not.
What makes this version unique:
Automatic Divergence Detection — the indicator connects the last peaks and troughs of the oscillator and compares them with price action. Bullish divergence (price makes lower lows while McClellan makes higher lows) and bearish divergence (price makes higher highs while McClellan makes lower highs) are drawn directly on the chart with clear visual markers.
4 Momentum States — not just "above/below zero". The label shows BULL ACCEL, BULL DECEL, BEAR ACCEL, BEAR DECEL so you know if momentum is building or fading.
Zero-line crossovers — instant detection of bullish and bearish crosses with visual alerts.
Multi-Timeframe — read McClellan from any timeframe while staying on your chart. M1 chart with H1 McClellan? Done.
Full EA Integration — every computed value is available as a buffer for Expert Advisors via iCustom() or CopyBuffer(). Build automated strategies on top of this indicator.
Buffers for EA developers:
- Buffer 0: Negative histogram
- Buffer 1: Positive histogram
- Buffer 2: McClellan Oscillator line
- Buffer 3: Fast EMA
- Buffer 4: Slow EMA
- Buffer 5: Bullish divergence signal
- Buffer 6: Bearish divergence signal
Works on any symbol (Forex, Indices, Crypto, Commodities) and any timeframe.
Why McClellan instead of MACD:
- MACD = price only. McClellan = price + volume.
- McClellan detects accumulation and distribution that MACD cannot see.
- Volume divergences appear 3-5 bars before price divergences.
- Better early warning for trend reversals.
