Smart Divergence Engine Overlay
Smart Divergence Engine — Overlay (Price-Chart) User Guide
What it is (one-liner)
A price-chart overlay that draws divergence lines and BUY/SELL labels directly on your candles using the same logic as the SDE panel—so you can see where the momentum shift happened and manage risk off real swing points.

Quick Start (TL;DR)
Add the Overlay to your chart (works on any symbol/timeframe).
Watch for:
Bullish Divergence → green line from prior swing low to the new lower low + BUY label at the pivot candle.
Bearish Divergence → red line from prior swing high to the new higher high + SELL label at the pivot candle.
Entry: Conservative—wait for the next candle to confirm in your direction. Aggressive—enter on signal close.
Place your stop beyond the swing that printed the label (the pivot).
(Optional) Turn lines/labels on or off, change line width/colors from Inputs.
Set alerts: “Bullish Divergence (Overlay)” or “Bearish Divergence (Overlay)”.
How it works (plain English)
The overlay mirrors the SDE panel’s RSI + volatility context under the hood.
It detects confirmed swing pivots on price (Left/Right bars), samples RSI at those exact pivot bars, and checks for classic divergences:
Bullish: Price lower low, RSI higher low → prints a green line and a BUY label at the pivot candle.
Bearish: Price higher high, RSI lower high → prints a red line and a SELL label at the pivot candle.
Objects are anchored to the pivot bars (bar index + price), so they stick to candles when you scroll/zoom.
Why signals don’t appear immediately: A pivot is only confirmed after R bars form to its right. Signals purposefully wait for that confirmation to avoid “guessing” swings.
What you’ll see on the price chart
Divergence lines:
Green up-slanted connectors for Bullish.
Red down-slanted connectors for Bearish.
Labels:
BUY at the bullish pivot candle.
SELL at the bearish pivot candle.
Lines and labels are compact and candle-anchored for clean scaling.
Inputs (explained)
Core (mirrors the panel)
Price Source: Default
close.RSI Length: Default 14.
Volatility Band Length: Default 34.
Band Multiplier: Default 1.618.
Overbought / Oversold: Defaults 68/32.
Pivot Left / Right: Defaults 10/10. Larger = sturdier pivots, fewer but higher-quality signals.
Visual toggles
Show divergence lines: On/off.
Show BUY/SELL labels: On/off.
Line Width: 1–6.
Bull/Bear Colors: Pick your palette (defaults: lime/red).
Alerts (ready to use)
Bullish Divergence (Overlay)
Bearish Divergence (Overlay)
Setup: TradingView → Alerts → Condition = Smart Divergence Engine Overlay → choose one of the two alertconditions → configure your preferred delivery.
Trading Playbook
A) Classic Divergence Reversal
Context: Price pushes into a key S/R zone or after an extended run.
Trigger: A green line + BUY label (or red line + SELL).
Entry: Conservative—wait for a structure candle in your direction.
Stop: Beyond the pivot extreme (the swing that printed the label).
Targets: Prior swing levels, fair value gaps, session highs/lows; scale out at first resistance/support.
B) Overlay + Panel Combo (high-confidence)
Use the Overlay to anchor risk on the price swing.
Use the Panel to time momentum (divergence and/or Shark Fin re-entry).
When both fire in the same region, treat it as an A-setup.
Timeframes & presets
Scalp
1–5m
5 / 5
Faster confirmations; expect more signals.
Day trade
5–15m
8–10 / 8–10
Well-balanced (the defaults).
Swing
1h–4h
12–20 / 12–20
Fewer, cleaner prints; widen stops to structure.
Tip: If signals feel noisy, increase Pivot L/R. If too few, decrease them modestly.
Risk Management (do not skip)
Always anchor your stop beyond the pivot that threw the label.
Size so a single failed divergence is a small loss.
Scale out at obvious reaction zones; trail remaining size behind structure.
Avoid chasing signals right before/after major news.
Best Practices
Clean chart: If needed, hide labels or lines temporarily.
HTF confluence: Mark Higher-Timeframe S/R and use the overlay to trigger inside those areas.
Session context: London and New York opens often add momentum that completes divergence ideas.
Panel synergy: Let the Panel be your momentum radar; let the Overlay handle execution and risk on price.
Troubleshooting
“I saw a divergence but nothing printed.” Likely the pivot wasn’t confirmed yet, or the RSI comparison at that exact pivot didn’t qualify.
“Too many lines cluttering my chart.” Turn Show labels/lines off selectively, increase Pivot L/R, or trade higher timeframes.
“Signals vary by symbol.” Markets differ in volatility. If you rarely see signals, reduce Pivot L/R a bit; if you see too many, raise them.
Advanced Notes (for power users)
The overlay reads RSI values at the pivot bar (the candle indexed
bar_index - Rwhen the pivot confirms).All drawings are bar-index anchored with price y-values so they stick to candles as you zoom/pan.
Alerts fire on the exact bar the divergence confirms—matching the panel’s timing.
Changelog info (what you’re using)
Name: Smart Divergence Engine Overlay [ChartNation]
Defaults: RSI 14, Bands 34 × 1.618, OB/OS 68/32, Pivot 10/10, lines/labels ON, line width 3, bull lime / bear red.
Pairing: Designed to be 1:1 compatible with the Smart Divergence Engine (Panel).
Final word
Use the Overlay to execute with precision: signals show where momentum flipped on price, stops anchor to real swings, and targets ladder through structure. Add the Panel for timing and let discipline do the rest.
Last updated