Divergence for Many Indicators v4 ST
Jan 11, 2022

The Divergence for Many Indicators v4 ST tool identifies regular and hidden divergences across up to 11 different technical oscillators simultaneously to find potential trend reversals or continuations. This strategy-enabled version incorporates automated backtesting capabilities, including customizable stop loss and take profit parameters, to evaluate divergence-based trading systems.
Usage
The indicator can be used to spot high-probability reversal zones by looking for "confluence"—where multiple indicators (such as RSI, MACD, and Stochastic) all show divergence at the same price point.
- Regular Divergence: Used to identify potential trend reversals. For example, if price makes a lower low but the oscillator makes a higher low, a bullish regular divergence is signaled.
- Hidden Divergence: Used to identify potential trend continuations. For example, if price makes a higher low but the oscillator makes a lower low, a bullish hidden divergence is signaled.
- Minimum Divergence Filter: Use the "Minimum Number of Divergence" setting to filter out noise; setting this to a higher value (e.g., 3) ensures that signals only appear when three or more indicators agree.
- Strategy Execution: The strategy enters a long position on bullish divergence and a short position on bearish divergence. It is designed to stay in the trade until an opposite signal occurs or the Stop Loss/Take Profit percentages are hit.
Details
The script functions by identifying pivot points over a user-defined period. It then compares these price pivots to the corresponding values in the selected oscillators (MACD, RSI, Stochastic, CCI, Momentum, OBV, VWmacd, CMF, and MFI).
Key implementation details:
- Non-Repainting: Signals are confirmed based on the "Pivot Period" and do not change once the bar has closed, ensuring backtest reliability.
- Slope Validation: The algorithm checks the "slope" between pivots to ensure no intermediate price action has invalidated the divergence.
- Confirmation: By default, the script waits for one bar of confirmation, though this can be disabled for faster (but riskier) entries.
Settings
General Settings
- Pivot Period: The number of bars used to identify a local high or low (Pivot Point).
- Source for Pivot Points: Choose between "Close" or "High/Low" for calculating price pivots.
- Divergence Type: Choose to display Regular, Hidden, or both types of divergences.
- Minimum Number of Divergence: The threshold of concurrent indicator divergences required to trigger a signal.
Indicators to Check
- MACD/RSI/Stochastic/etc.: Toggle buttons to include or exclude specific indicators from the divergence calculations.
- Check External Indicator: Allows you to link the script to a completely different indicator on your chart for divergence analysis.
Strategy & Visuals
- Stop Loss %: Sets the percentage-based exit for losing trades.
- Take Profit %: Sets the percentage-based target for winning trades.
- Show Divergence Lines: Draws lines on the chart connecting the price and indicator pivots.
FAQ
How do I use the external indicator feature?
In the settings, enable "Check External Indicator" and use the "External Indicator" source dropdown to select the output plot of another indicator you have loaded on your workspace.
Why don't I see signals on every pivot?
The script filters signals based on the "Maximum Bars to Check" and the "Minimum Number of Divergence" settings. If those criteria are not met, or if a price movement has broken the divergence slope, no signal will appear.
How can I access Divergence for Many Indicators v4 ST?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.

