Double Stochastic Divergence
May 4, 2019

The Double Stochastic Divergence indicator tool provides a comprehensive momentum analysis by overlaying two separate Stochastic oscillators and identifying both regular and hidden divergences. It combines a highly customizable main Stochastic with a fractal Stochastic (standard or RSI-based) to help traders identify trend exhaustion and potential reversal points with multiple visual confirmation layers.
Usage
The indicator can be used to spot momentum shifts and trend reversals through several visual cues:
- Divergence Signals: The script automatically identifies bullish and bearish regular and hidden divergences on both the main and fractal Stochastics. Regular divergences suggest trend reversals, while hidden divergences often point toward trend continuation.
- Dual-Oscillator Comparison: By plotting a main Stochastic alongside a "fractal" (usually faster or different timeframe/source) Stochastic, users can identify when momentum is synchronized across different cycles.
- Trend Confirmation: Use the background shading to stay on the right side of the trend. Shading can be configured based on MA crossovers, MACD, or Top Dog Trading (DAD) logic.
- Color-Changing %D: The main Stochastic's %D line changes color based on direction, providing an immediate visual cue for momentum shifts.
Details
The tool offers flexibility in how momentum is calculated. Users can choose between a standard Price-based Stochastic or a Volume-based (OBV) Stochastic. Additionally, both the main and fractal components can be switched to a Stochastic RSI calculation, which applies the Stochastic formula to RSI values rather than price, often resulting in more sensitive overbought and oversold readings.
The divergence detection logic is optimized for realistic entry points, with an optional offset setting to align the signals with actionable price action.
Settings
Main Stochastic
- Main Stochastic - Source: Choose between Price or On Balance Volume (OBV).
- Main Stochastic - K/D/Smoothing: Adjust the periods for the %K line, %D line, and initial smoothing.
- Plot Stochastic RSI: Toggle to use RSI as the base for the main Stochastic calculation.
Fractal Stochastic
- Fractal Stochastic - K/D/Smoothing: Independent settings for the secondary fractal oscillator.
- Fractal Stochastic - Plot Stochastic RSI: Toggle for the fractal calculation.
Background Shading
- Background Shading - According To: Select the trend detection logic (MA, MACD, RSI Signal Cross, or DAD).
- MA Lengths/Types: Customize the moving averages used for the trend background.
Divergences
- Regular/Hidden Divergences: Toggle the display of different divergence types for both oscillators.
- Divergence Labels: Enable or disable text labels on the chart for identified divergences.
FAQ
How do I access Double Stochastic Divergence?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the benefit of the fractal Stochastic?
The fractal Stochastic acts as a secondary layer of momentum, allowing you to see faster cycles or different calculation methods (like Stochastic RSI) overlaid on your primary momentum indicator to spot earlier entries.
Which setting is best for the %K period?
A common value for %K is 5. However, a value of 3 is often used for faster entries on higher timeframes, while a value of 4 is recommended if using the indicator strictly for cycle-based exits.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.