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.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

