Multiple divergences NON-REPAINT by PeterO
Feb 19, 2020

The Multiple divergences rework NON-REPAINT by PeterO indicator scans for regular and hidden divergences across up to 10 different technical oscillators simultaneously to help identify high-probability trend reversals and trend-following opportunities.
Usage
The Usage section describes how the script can be used to identify market turning points or trend continuations. By aggregating signals from multiple indicators, the script provides a "confluence count" displayed as a label on the chart.
- Regular Divergences: These occur when price makes a new high/low that is not confirmed by the oscillator, suggesting a potential trend reversal.
- Hidden Divergences: These occur when the oscillator makes a new high/low that is not confirmed by price. These are typically used to identify "dips" or "peaks" within an existing trend to find entry points for trend continuation.
- Confluence Scaling: Users can filter for quality by adjusting the minimum divergence count. A label showing "8" indicates that eight different indicators are signaling a divergence at the same pivot point, which generally offers higher statistical significance than a single-indicator signal.
Details
The script incorporates logic derived from Lonesometheblue and the built-in TradingView divergence scripts. Unlike many label-based indicators that are limited by a maximum buffer of recent occurrences, this implementation is designed to allow for historical analysis across the entire chart.
The tool calculates divergences for the following oscillators:
- Relative Strength Index (RSI)
- Moving Average Convergence Divergence (MACD) and its Histogram
- Stochastic Oscillator
- Commodity Channel Index (CCI)
- Momentum
- On-Balance Volume (OBV)
- Diosc
- Volume Weighted MACD (VW-MACD)
- Chaikin Money Flow (CMF)
Settings
- Repaint or not?: Toggles the visual offset. Setting this to false ensures signals only appear after the pivot point is confirmed, preventing the indicator from "repainting" past signals.
- Minimum Div Count to Display: Sets the threshold for how many oscillators must agree before a label is plotted on the chart.
- Pivot Lookback Right / Left: Defines the number of bars required to confirm a local high or low pivot point.
- Max/Min of Lookback Range: Determines the search window (in bars) between the current pivot and the previous pivot to identify divergence.
- Plotting Toggles: Allows users to enable or disable specific types of divergences (Bullish, Bearish, Hidden Bullish, Hidden Bearish).
- Indicator Toggles: A list of checkboxes to include or exclude specific oscillators from the aggregate calculation.
FAQ
How do I interpret the numbers on the labels? The number inside the label indicates the total count of indicators that have detected a divergence at that specific price pivot. Higher numbers suggest stronger confluence.
What is the difference between regular and hidden divergences in this tool? Regular divergences are used to spot potential trend endings or reversals. Hidden divergences are best utilized during retracements to signal that the primary trend is likely to resume.
How can I access this script? 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.

