Divergence-Support/Resistance - Widget
Nov 17, 2021

The Divergence-Support/Resistance - Widget indicator provides a live, comprehensive dashboard that tracks key support and resistance levels alongside divergence information. It aims to help traders visualize market structure across multiple timeframes or sensitivities by calculating dynamic levels derived from various zigzag lengths and oscillator sources.
Usage
The tool is designed to serve as a central hub for price structure analysis. By monitoring four different zigzag sensitivities, it identifies significant price pivots and transforms them into support and resistance levels. The widget output displays the distance to the nearest levels, providing immediate context for risk management or entry positioning.
Traders can customize the visual output by selecting different candle types—Regular, Heikin-Ashi, or Moving Average candles—to filter price noise. Additionally, the integrated divergence detection system monitors momentum shifts at these structural levels, offering insights into potential reversals or trend continuations.
Details
The script utilizes four concurrent zigzag calculations (defaulting to lengths of 5, 8, 13, and 21) to find market structure. Support and resistance levels are established at the peaks and troughs of these zigzags.
- Oscillator Integration: The indicator automatically scales oscillator lengths based on the selected zigzag sensitivity to ensure divergence signals are relevant to the timeframe being analyzed.
- Custom Candles: Users can toggle between standard OHLC, Heikin-Ashi (for trend smoothing), or MA-based candles (using types like HMA, EMA, or VWMA) to change how pivots are detected.
- Alert System: The script includes logic for both the formation of new levels and the breakout of existing structural levels.
Settings
Candles
- OHLC Source: Choose between regular, Heikin-Ashi (ha), or Moving Average (ma) candles.
- Moving Average Type: Select the smoothing method for MA candles (SMA, EMA, HMA, etc.).
- MA Length: The period used for the selected moving average type.
Zigzag
- Show Zigzag (1-4): Toggles the visibility of the four different zigzag sensitivity levels.
- Zigzag Length (1-4): Adjusts the sensitivity for each of the four structural calculations.
- Line Style: Sets the visual appearance (solid, dashed, dotted) for each zigzag.
Oscillator
- Oscillator Source: Choose the momentum indicator for divergence (RSI, CCI, MFI, etc.).
- External Source: Option to use a custom external input for divergence calculations.
Misc
- Max S/R Per Zigzag: Controls how many historical levels are stored for each sensitivity.
- Max S/R for Stats/Alerts: Limits the number of levels displayed in the widget or sent via alerts to maintain clarity.
FAQ
- How do I interpret the widget values? The widget shows the raw price of the nearest support and resistance levels and the percentage or point distance from the current price, helping you identify immediate "zones of interest."
- Can I use this for breakout trading? Yes, the script includes specific alerts for when an existing support or resistance level is broken, which can be used to identify breakout opportunities.
- How can I access the Divergence-Support/Resistance - Widget? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
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.