Request A Free Quote
NinjaTrader 8 Best Seller

NinjaTrader Divergence Indicator

The NinjaTrader Divergence Indicator is designed to detect divergence patterns that may indicate changes in market dynamics, including potential shifts in momentum or sustained directional phases. The indicator determines the regular (classic) and hidden divergence calculated based on the RSI, Stochastic and MACD oscillators.

NinjaTrader Divergence Indicator NinjaTrader RSI Divergence Indicator NinjaTrader Divergence Indicator
5-Day Free Trial Cancel Anytime Continuous Product Updates Mon-Fri Free Support
Lifetime License
€200one-time
This indicator only · 1 PC · No recurring payments · Free updates included
Start Free Trial — 5 Days Free
Try all indicators & trade copiers free. If you don’t cancel within 5 days, a €25/mo subscription starts automatically.

Already a subscriber or have purchased a product?

Overview

What the Divergence Indicator Does

NinjaTrader Divergence Indicator is designed to determine the well-known trading concept — divergence on the classic RSI, Stochastic and MACD technical analysis indicators.

A divergence forms on the chart when price movement begins to differ from the behavior of a technical indicator. In practice, this occurs when price continues to move in one direction while the underlying momentum measured by an oscillator starts to weaken or move differently.

Divergence analysis is widely used in discretionary trading, momentum analysis, and algorithmic trading strategies as a way to compare price structure with underlying momentum indicators.

Oscillators such as RSI, Stochastic, and MACD measure internal market momentum rather than price alone. When this internal momentum no longer confirms new highs or lows in price, a divergence pattern can emerge. This situation may highlight a temporary imbalance between price movement and the underlying momentum structure.

Because of this relationship between price and momentum, divergence patterns are widely studied in technical analysis as analytical structures that may precede changes in market behavior, including potential reversal phases or trend continuation scenarios depending on the broader market context.

It is important to note that divergence patterns do not predict future price movement. Instead, they highlight situations where price behavior and momentum temporarily diverge, which traders may use as an additional analytical reference within their broader market analysis.

The NinjaTrader Divergence Indicator detects divergence across three widely used oscillators — RSI, Stochastic, and MACD. The parameters of these indicators can be adjusted to suit different analytical preferences.

To ensure important divergence events are not overlooked, several types of alerts can be configured.

The indicator supports two divergence classifications — regular (classic) divergence and hidden divergence. If only one divergence type is required for analysis, the other can be disabled in the indicator settings.

Built-In MFE/MAE Tracker

The indicator includes an MFE/MAE Tracker module that measures how price has moved after each signal — how far it moved in the favorable direction and how far it moved against it, tracked across several configurable holding periods at once.

Results are shown directly on the chart as a dashboard and can be exported to CSV, giving a way to review signal behavior across a large sample rather than relying on visual impression from scrolling the chart. See how the MFE/MAE Tracker is calculated and how to read the dashboard →

How to Use

How to Interpret and Use the Divergence Indicator

The indicator visualises detected divergences in the form of lines connecting price extremes (price swing highs and lows), as well as entry triangles (pointers) that display the detected divergence direction on the chart.

Green triangles mark bullish divergence events, while red triangles mark bearish divergence events. Depending on the type of divergence — bearish or bullish — the lines are colored red or green.

Divergence Type

Regular (classical) divergence

Regular (classical) divergence is commonly interpreted as a structure that may precede a potential shift in market momentum.

Regular bullish divergence — price makes lower minimums and the oscillator makes higher minimums.

Regular bearish divergence — price makes a higher maximum and the oscillator makes a lower maximum.

They are displayed on the chart as solid lines.

Divergence Type

Hidden divergence

Hidden divergence is commonly interpreted as a pattern that may occur during an ongoing sustained directional phase.

Hidden bullish divergence — price makes a higher minimum, but the oscillator makes a lower minimum.

Hidden bearish divergence — price makes a lower maximum and the oscillator makes a higher maximum.

They are displayed on the chart as dashed lines.

Settings

Indicator Settings & Parameters

Full parameter reference, grouped by configuration area.

ParameterDescription
Detection
BaseIndicatorIndicator selection for detecting divergences.
LookbackPointsDefines the lookback period during which a divergence may occur.
Divergence Types
EnableClassicDivergencesEnable/disable the detection of regular (classic) divergences.
EnableHiddenDivergencesEnable/disable detection of hidden divergences.
Alerts
AlertsSetting up various types of alerts.
Strategy & Automation

Plot Outputs for Strategy Builder & Automation

The indicator provides a set of exposed analytical plot outputs designed for structured integration with third-party strategy builders and automation tools such as BloodHound and BlackBird (SharkIndicators), as well as other algorithmic trading environments.

Valuenumeric plot value > 0condition active when the value is above zero

Classic Divergence

  • Classic Bullish Confirmed DIV Signal> 0
  • Classic Bearish Confirmed DIV Signal> 0
  • Classic Bullish Forming DIV Signal> 0
  • Classic Bearish Forming DIV Signal> 0

Hidden Divergence

  • Hidden Bullish Confirmed DIV Signal> 0
  • Hidden Bearish Confirmed DIV Signal> 0
  • Hidden Bullish Forming DIV Signal> 0
  • Hidden Bearish Forming DIV Signal> 0

Oscillator Values

  • MACDDefaultValue
  • MACDAvgValue
  • MACDDiffValue
  • RSIMainValue
  • RSIAvgValue
  • StochasticsDValue
  • StochasticsKValue

Swing Points

  • Swing HHValue
  • Swing LHValue
  • Swing EHValue
  • Swing LLValue
  • Swing HLValue
  • Swing ELValue

MFE/MAE Tracker

  • Long MFE/MAE Period 1Value
  • Short MFE/MAE Period 1Value
  • Long MFE/MAE Period 2Value
  • Short MFE/MAE Period 2Value
  • Long MFE/MAE Period 3Value
  • Short MFE/MAE Period 3Value
  • Long MFE/MAE Period 4Value
  • Short MFE/MAE Period 4Value
  • Long MFE/MAE OppositeValue
  • Short MFE/MAE OppositeValue

Plot output names are technical identifiers intended solely for software integration purposes and do not constitute trading advice, signals, or recommendations.

Requirements & Installation

System Requirements & Installation

What you need to run the indicator, how to download and install it in NinjaTrader 8, and how the license works.

System Requirements

Platform
NinjaTrader 8 (Desktop)
Operating system
Windows 10 or Windows 11
Instruments
Futures, forex, stocks and ETFs supported by NinjaTrader
Data
NinjaTrader’s native data connections

Not available on NinjaTrader Web or Mobile. NinjaScript indicators run in NinjaTrader Desktop only.

License Terms

Lifetime License
This indicator only, 1 PC, one-time payment, free updates included.
All-Access Subscription
All indicators and trade copiers, billed monthly, cancel anytime, updates included while the subscription is active.
Free trial
5 days on the subscription plan. If not cancelled, the subscription starts automatically.
License binding
Linked to your email and to the computer on which it was first activated.
Moving to another computer
Available on request through support.

Installation

  1. Get access

    Start the free trial, subscribe, or buy a lifetime license on this page.

  2. Download

    The indicator is not sent by email. Open (top right of this page) and enter the email you used for your trial, subscription or purchase. The installation file (.zip) downloads to your computer.

  3. Import into NinjaTrader 8

    In the Control Center, go to Tools → Import → NinjaScript Add-On and select the downloaded .zip file. Do not unzip it.

  4. Add to a chart

    Open a chart, click Indicators, select the indicator from the list and apply it.

  5. Activate the license

    In the indicator settings, enter the same email. On first activation, the license is linked to that email and to your computer.

Updating: When a new version is released, download it again through and import it the same way over the existing version.

Installation questions? Contact support, Monday to Friday.

Developed by Nordman Algorithms

Developed, tested, documented, and maintained by our algorithmic trading software development team.

Meet the Team →
We Value Your Feedback Help us make it better

If you’ve spotted a bug, feel something essential is missing, or have ideas that could make this indicator better — we want to hear it.
Your feedback directly shapes future updates.

Send Feedback →
Custom Programming

Need a different setup?

We can customize this indicator to your workflow, or convert it into a fully automated trading strategy with risk management and trailing-stop logic. Fixed-price quote before development begins.

Custom Logic Strategy Automation Risk & Trailing-Stop Logic Alert & Automation Outputs