Indicator · Market Structure & Flow
Available

Divergence with Trade Plan

Regular and hidden divergences between price swings and up to nine oscillators, how many agree on the same two swings, the trade plan from each one and the track record of those trades.

Available·NinjaTrader 8·mdtDivergence
chart image
Divergence with Trade Plan on a NinjaTrader 8 chart
What it shows

Divergences that agree, with a plan attached.

Nine oscillators, any mix

RSI (14), MACD histogram (12, 26, 9) and Stochastic %K (14, 3) on by default; CCI (20), MFI (14), OBV, CMF (20), Awesome oscillator and Momentum (10) available. Each is read at the swing bars.

Regular and hidden, both sides

Regular: price makes a higher high while the oscillator makes a lower high (bearish), or a lower low against a higher low (bullish). Hidden: price makes a lower high against a higher high (bearish), or a higher low against a lower low (bullish). Either type can be switched off.

Swings and spacing

Fractal swings of 3 bars each side by default; a divergence compares the newly confirmed swing with the previous one of the same side at most 60 bars before it, and the oscillator must differ by at least 5 percent of its recent range.

Confluence on the label

Oscillators that show the same divergence on the same two swings are grouped. The label names the type and how many agree, and a minimum number agreeing can be required.

A trade plan from the confirming bar

The line is drawn back to the swings on the bar that confirms the second one. The trade triggers on a move beyond that bar's extreme within 10 bars; the stop goes 0.1 ATR beyond the swing; targets at 1 R and 2 R with the exit at 2 R and a 240-minute time stop. Not triggered in time: expired. Stop reached before the trigger: broken, counted apart and never a trade.

The track record on 1-minute bars

Triggers and outcomes resolve on hidden 1-minute data with slippage and commission counted. The panel shows all trades, regular, hidden, and those with two or more oscillators agreeing, each with n.

On the chart

What it looks like in a session.

screenshot 1
screenshot 2
screenshot 3
clip: scrolling the chart
Scrolling the chart: the rendering in real time, and the panel buttons.

Background

Divergence as a setup, not a signal.

A divergence is a disagreement: price makes a new extreme and a momentum oscillator does not. Regular divergence suggests the move is tiring; hidden divergence, where the oscillator makes the new extreme and price does not, suggests a pullback inside a trend is ending. The idea is old and the oscillators are standard. What is usually missing is a rule for when the divergence is confirmed, what trade follows from it, and how that trade has done. Divergence with Trade Plan supplies all three.

Each divergence is a line between its two price swings, solid for regular and dashed for hidden, with a label beyond the second swing naming the type and the oscillators that agree. From the confirming bar a trigger level runs until the trade triggers or expires; after a trigger the entry, stop and target stay drawn until the outcome, when the result in R replaces them. The corner panel holds the record, split by type and by confluence.

Confluence counts how many oscillators agree; it is not a probability. The record is this chart's history over the loaded 1-minute days, costs included, and always shows its n. Lines are drawn on the price panel only, not on the oscillator panels. Swing strength, spacing, the oscillator set, trigger window, stop, targets and time stop are settings and rebuild live.

illustration
Price making a lower low while an RSI line beneath makes a higher low, the two price swings joined by a line, with a trigger level above the second swing and a stop just below it.
Settings

Every setting, explained.

Read from the indicator's own settings, so this table always matches the current build.

GroupSettingWhat it does
OscillatorsRSI (14)
MACD histogram (12, 26, 9)
Stochastic %K (14, 3)
CCI (20)
MFI (14)
OBV
CMF (20)
Awesome oscillator
Momentum (10)
DivergencesSwing strength (bars each side)
Most bars between the swings
Smallest oscillator difference (% of its range)
Regular divergences
Hidden divergences
Oscillators agreeing at least
Trade plan and costsATR period (chart bars)
Trigger within (bars)A trade at or beyond the confirming bar's high (bullish) / low (bearish).
Stop beyond the swing (x ATR)
Targets (R)e.g. 1, 2
Exit at target #
Time stop (minutes)
Slippage (ticks per side)
Commission (per round turn)Futures only; other instruments count the slippage only.
History and alerts1-minute days (track record window)A change needs a reload.
Alert on a divergence
Alert on a trigger

One license. Every tool.

Divergence with Trade Plan is one of 76 tools in the Suite.