What it does

SuperTrend ATR Stop is a simple trend-following overlay built from ATR distance and close-based flip logic. It is designed as a visual trailing reference and trend-state filter, not as a complete entry system.

Who this is for

This page is a good fit for traders who want a readable SuperTrend ATR Stop workflow without having to reverse-engineer the setup from forum posts or screenshots.

Key terms for this tool

Review the core trading and platform terms tied to this page before changing settings or using the study in a live workspace.

What it is not

SuperTrend ATR Stop is a chart-context tool. It does not place trades, manage risk automatically, or promise that a specific pattern will resolve in one direction. Use it to organize decisions, not to outsource them.

Chart examples

This chart capture shows the study on a real NinjaTrader workspace. Use it as visual reference, then confirm behavior on your own instrument, session, and timeframe.

Best fit

  • Keeping a simple ATR trailing reference on trend-following charts.
  • Filtering countertrend ideas when price remains on the wrong side of the stop.
  • Reviewing whether wider or tighter volatility stops fit a given market.

Before using it live

  • Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
  • Start with the default ATR period and multiplier, then test wider or tighter settings by market.
  • Use the stop line as trend context or trade-management support, not as a guaranteed exit model.
  • Review how the tool behaves on your actual session template, chart type, and instrument.

Settings to review

ATR period

Controls the volatility lookback used to size the stop distance.

Multiplier

Sets how far the stop line sits from the median price.

Show flip markers

Toggles arrows when price closes through the active stop line.

Up trend color

Controls the plot color while the stop is in bullish trend state.

Down trend color

Controls the plot color while the stop is in bearish trend state.

Installation notes

  1. Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
  2. Start with the default ATR period and multiplier, then test wider or tighter settings by market.
  3. Use the stop line as trend context or trade-management support, not as a guaranteed exit model.

Downloads

FreeIndicators SuperTrend ATR Stop for NinjaTrader 8 NinjaTrader 8
Download

Source code

These source examples are provided for copy/paste workflows on other charting platforms. Review and test any script in a simulator before using it on a live chart.

TradeStation EasyLanguage / MultiCharts PowerLanguage SuperTrendATRStop.eld.txt
{
  SuperTrend ATR Stop
  FreeIndicators.com source example.
  Works as a starting point for TradeStation EasyLanguage and MultiCharts PowerLanguage.
}

Inputs: ATRLength(10), Multiplier(3);
Vars: ATRValue(0), MidPrice(0), UpperBand(0), LowerBand(0), StopLine(0), TrendUp(true);

ATRValue = AvgTrueRange(ATRLength);
MidPrice = (High + Low) / 2;
UpperBand = MidPrice + ATRValue * Multiplier;
LowerBand = MidPrice - ATRValue * Multiplier;

If TrendUp Then Begin
  StopLine = MaxList(LowerBand, StopLine[1]);
  If Close < StopLine Then Begin TrendUp = false; StopLine = UpperBand; End;
End Else Begin
  StopLine = MinList(UpperBand, StopLine[1]);
  If Close > StopLine Then Begin TrendUp = true; StopLine = LowerBand; End;
End;

Plot1(StopLine, "ATRStop");
MetaTrader 4 MQL4 SuperTrendATRStop.mq4
// SuperTrend ATR Stop
// FreeIndicators.com source example for MetaTrader 4.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_color3 SeaGreen

double Buffer1[];
double Buffer2[];
double Buffer3[];

int init() {
   SetIndexBuffer(0, Buffer1);
   SetIndexBuffer(1, Buffer2);
   SetIndexBuffer(2, Buffer3);
   return(0);
}

int start() {
   int counted = IndicatorCounted();
   int limit = Bars - counted - 1;
   int atrPeriod = 10;
   double multiplier = 3.0;
   for(int i = limit; i >= 0; i--) {
      double atr = iATR(NULL, 0, atrPeriod, i);
      double median = (High[i] + Low[i]) / 2.0;
      Buffer1[i] = Close[i] >= median ? median - atr * multiplier : median + atr * multiplier;
   }
   return(0);
}
MetaTrader 5 MQL5 SuperTrendATRStop.mq5
// SuperTrend ATR Stop
// FreeIndicators.com source example for MetaTrader 5.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 3

double Buffer1[];
double Buffer2[];
double Buffer3[];

int OnInit() {
   SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
   SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
   SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
   return(INIT_SUCCEEDED);
}

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[]) {
   int start = prev_calculated > 1 ? prev_calculated - 1 : 1;
   int atrPeriod = 10;
   double multiplier = 3.0;
   for(int i = start; i < rates_total; i++) {
      double median = (high[i] + low[i]) / 2.0;
      double proxyAtr = high[i] - low[i];
      Buffer1[i] = close[i] >= median ? median - proxyAtr * multiplier : median + proxyAtr * multiplier;
   }
   return(rates_total);
}
TradingView Pine Script v5 SuperTrendATRStop.pine
//@version=5
indicator("SuperTrend ATR Stop", overlay=true)

atrLength = input.int(10, "ATR period", minval=1)
mult = input.float(3.0, "Multiplier", minval=0.1)
atrValue = ta.atr(atrLength)
median = hl2
upperBand = median + atrValue * mult
lowerBand = median - atrValue * mult
var bool trendUp = true
var float stopLine = na
stopLine := trendUp ? math.max(lowerBand, nz(stopLine[1], lowerBand)) : math.min(upperBand, nz(stopLine[1], upperBand))
trendUp := trendUp and close < stopLine ? false : not trendUp and close > stopLine ? true : trendUp
stopLine := trendUp ? lowerBand : upperBand
plot(stopLine, "SuperTrend ATR Stop", color=trendUp ? color.green : color.red, linewidth=2)

After the download

Keep the next step tied to this exact tool

Install it cleanly, subscribe for future updates if this workflow matters, or move straight into a structured request if the tool needs another platform or a custom version.

Limitations

  • SuperTrend-style lines can flip repeatedly in balanced or choppy sessions.
  • ATR distance is not the same as structural invalidation.
  • A close through the line does not prove a new trend has begun.

Frequently asked questions

Does it repaint?

This tool can revise its most recent labels or levels until enough bars have formed to confirm the swing or range it is using. Older confirmed values should be more stable than the most recent developing ones.

Which platforms are covered?

NinjaTrader 8, TradeStation EasyLanguage, MultiCharts PowerLanguage, MetaTrader 4, MetaTrader 5, TradingView Pine Script are currently represented through downloads or source pages.

Is source code included?

Yes. This page includes source examples or links to platform-specific source pages where applicable.