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.
Already a subscriber or have purchased a product?
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.
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 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.
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.
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.
Indicator Settings & Parameters
Full parameter reference, grouped by configuration area.
| Parameter | Description |
|---|---|
| Detection | |
| BaseIndicator | Indicator selection for detecting divergences. |
| LookbackPoints | Defines the lookback period during which a divergence may occur. |
| Divergence Types | |
| EnableClassicDivergences | Enable/disable the detection of regular (classic) divergences. |
| EnableHiddenDivergences | Enable/disable detection of hidden divergences. |
| Alerts | |
| Alerts | Setting up various types of alerts. |
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.
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.
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
- Get access
Start the free trial, subscribe, or buy a lifetime license on this page.
- 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.
- Import into NinjaTrader 8
In the Control Center, go to
Tools → Import → NinjaScript Add-Onand select the downloaded .zip file. Do not unzip it. - Add to a chart
Open a chart, click Indicators, select the indicator from the list and apply it.
- 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.
"Best Seller" and "Trending" reflect Nordman Algorithms sales and usage data, January–September 2026.
Disclaimer — Software Use & Risk Disclosure
Nordman Algorithms is a trade name of Nordman Algorithms OÜ (Reg. No. 14435535), registered in Tallinn, Estonia.
Software Use
Software Nature & User Responsibility — Nordman Algorithms provides algorithmic software tools for technical analysis. Nordman Algorithms is not a financial advisor and is not liable for any losses. All trades conducted based on the software’s output are executed at the user’s sole discretion and risk.
Visual Markers & Signal Disclosure — This software may display visual markers (such as arrows, dots, or alerts) when predefined mathematical conditions are met. These markers are provided for educational and analytical purposes only, must not be interpreted as financial guidance, and do not constitute a recommendation to buy, sell, or hold any financial instrument. Users must independently validate all visual cues within their own trading methodology.
No Financial Advice — Nordman Algorithms does not provide discretionary trading signals, investment advice, or managed signal services. Our software represents a mathematical visualization of historical and real-time data. The appearance of a visual marker does not guarantee a profitable trade or predict future market behavior.
Read the full Terms of Service →Risk Disclosure
Trading Risk Warning — Futures, Forex, and options trading involve significant risk. Risk capital is money that can be lost without jeopardizing financial security. Only risk capital should be used for trading. Past performance is not indicative of future results. An investor could potentially lose all or more than the initial amount committed.
ESMA Risk Warning — Financial instruments, especially those involving leverage such as CFDs and Forex, are complex and carry a high risk of rapid financial loss. Our software provides analytical outputs and visual markers based on predefined mathematical conditions and does not mitigate or reduce inherent market risks. You should carefully consider whether you understand how leveraged financial instruments work and whether you can afford the high risk of losing your capital.
CFTC Rule 4.41 — Hypothetical or simulated performance results have inherent limitations. Unlike actual performance records, simulated results do not represent real trading. Because trades have not actually been executed, these results may under- or over-compensate for the impact of market factors such as liquidity. Simulated results are also subject to the benefit of hindsight. No representation is being made that any account will achieve profits or losses similar to those shown.
Read the full Risk Disclosure →Trademark Notice — NinjaTrader® is a registered trademark of NinjaTrader Group, LLC. No NinjaTrader company has any affiliation with the owner, developer, or provider of the products or services described herein, or any interest, ownership or otherwise, in any such product or service, or endorses, recommends or approves any such product or service.
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.


