- Product type
- Indicator
- Platforms
- NT
- Market / symbol
- Gold, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
- Product type
- Indicator
- Platforms
- NT
- Market / symbol
- Gold, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
Overview
ATR Trailing Stop draws a stop line on a NinjaTrader 8 chart whose distance from price comes from market volatility. The calculation follows the Chandelier Exit idea: the stop hangs from the highest high of recent bars rather than from the current price.
While price is above the line the stop only moves up, never back. When a bar closes below it, the line jumps above price and acts as the stop for a short. The current side is also available through the Direction series.
The indicator only shows the line. It does not move your stop order or close any trade. If you want a real stop to follow it, use the StopLine value in your own strategy.
- Trailing stop with adjustable ATR period, multiplier and lookback
- Flips side and colour when price closes across the line
- Choice of high/low or close as the basis
- A StopLine plot and a Direction series for strategies
Made by
This tool is written by the TradeKit team. The source code is open and included in the download. It is free to use.
Strategy logic
Two stops
- Long stop: the highest High of the last
LookbackPeriodbars minusMultiplier × ATR. - Short stop: the lowest Low of the same window plus
Multiplier × ATR. - With
UseCloseon, the highest and lowest Close are used instead of High and Low.
Ratchet
- While the previous bar closed above the long stop, the long stop is not allowed to fall.
- While the previous bar closed below the short stop, the short stop is not allowed to rise.
Flipping sides
- A close above the previous short stop turns the direction up and the line moves below price.
- A close below the previous long stop turns the direction down and the line moves above price.
- The Direction series is +1 in the first case and -1 in the second.
Specifications
Requirements
- NinjaTrader 8
- Works on any chart type and timeframe
- Needs at least as many bars as the longest period (22 by default) before the line is meaningful
- The indicator does not place or move orders
- Platforms
- NT
- Delivery
- Use case
- Swing، Trend following
- Market
- Gold، Indices، Crypto، Oil
- Experience level
- Intermediate
Compatible brokers
Which brokers this product works with, and which it works best with.
No broker restriction: it works with any broker that offers the product's platform.
The broker choice is yours; TradeKit is not a broker. Check account terms before depositing. All brokers
Input parameters
| Parameter | Default | Description |
|---|---|---|
AtrPeriodATR period |
22 |
ATR period |
MultiplierATR multiplier for the stop distance |
3.0 |
ATR multiplier for the stop distance |
LookbackPeriodBars used to find the highest high and lowest low |
22 |
Bars used to find the highest high and lowest low |
UseCloseUse the highest and lowest close instead of the high and low |
false |
Use the highest and lowest close instead of the high and low |
UpBrushLine colour while the stop is below price |
LimeGreen |
Line colour while the stop is below price |
DownBrushLine colour while the stop is above price |
Red |
Line colour while the stop is above price |
Install guide
- Unzip the download. It contains
TradeKitAtrTrailingStop.csand a short readme. - Copy
TradeKitAtrTrailingStop.csintoDocuments\NinjaTrader 8\bin\Custom\Indicators. - In NinjaTrader open New › NinjaScript Editor and press F5 to compile.
- Right-click a chart, choose Indicators and add
TradeKitAtrTrailingStopfrom the list.
F5 compiles every script in the Custom folder together. If another script has an error, this indicator will not appear in the list until that error is fixed.
Changelog
-
v1.0.0 NT New November 30, 2026
- Published on TradeKit
Buyer reviews
No reviews yet.
Only verified buyers can review. Reviews are moderated before publishing.
Only verified buyers can review. Reviews are moderated before publishing.
Sign in to write a reviewFAQ
How is it different from Supertrend?
Does it move my actual stop order?
Does the line change after a bar closes?
Where do 22 and 3 come from?
Related products
More Indicators and tools from the same family
Risk warning