All indicators

Price Divergence Detector V2

Feb 10, 2016

Static chart image
SignalsOscillatorsDivergencesPatterns

The Price Divergence Detector V2 indicator identifies regular and hidden price-to-oscillator divergences across eight different calculation methods to highlight potential trend reversals and continuations.

Usage

The Usage section focuses on identifying discrepancies between price action and momentum. Traders can use this tool to spot two primary types of divergences:

  • Regular Divergences: Occur when price makes a higher high/lower low, but the oscillator makes a lower high/higher low. These typically suggest a potential trend reversal.
  • Hidden Divergences: Occur when price makes a higher low/lower high, but the oscillator makes a lower low/higher high. These typically suggest trend continuation.

The indicator offers several visual modes:

  • Labels: Enables 'R' (Regular) or 'H' (Hidden) labels above/below bars.
  • Channel: Displays historical fractal points as a channel to visualize the structure being used for divergence detection.
  • Filtered Mode: When filtering is enabled, only divergences that meet specific distance (bar length) and price percentage change requirements are highlighted with an 'F' label.

Details

This tool utilizes a fractal-based approach to identify swing points (peaks and troughs) in both price and the selected oscillator. It evaluates the relationship between the two most recent peaks or troughs to determine if a divergence exists. Users can choose from several oscillators:

  • Momentum Based: RSI, Stochastic, RSI Stoch, CCI, Fisher Transform.
  • Trend/Volume Based: MACD, Volume MA, Accumulation/Distribution.

The script includes advanced filtering logic to eliminate "noise" by ensuring that the price movement between two peaks/troughs is significant enough to warrant a signal.

Settings

  • Method: Selects the oscillator used for detection (RSI, MACD, Volume, etc.).
  • Show Labels?: Toggles the visibility of regular and hidden divergence labels.
  • Show Channel?: Displays the fractal points used for calculations on the chart.
  • Oscillator Lengths: Individual length settings for RSI, Stoch, Volume MA, Acc/Dist, Fisher, and CCI.
  • MACD Settings: Inputs for Fast, Slow, and Smooth Signal lengths, plus the source price.
  • Filter Divergences?: Enables the requirement for specific price and time constraints.
  • Divergence Bar Length (Min/Max): Sets the required distance in bars between two fractal points.
  • Price Change % (Min/Max): Sets the required absolute percentage change in price between the two points.

FAQ

How do I access Price Divergence Detector V2?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What is the difference between Regular and Hidden divergence?

Regular divergence suggests the current trend is losing momentum and may reverse, while Hidden divergence suggests the trend is strong and likely to continue after a pullback.

Why am I not seeing any signals with the filter enabled?

If "Filter Divergences" is active, the tool only plots signals that meet your specific "Min/Max Bar Length" and "Price Change %" criteria. You may need to lower the minimum requirements to see more signals.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.