Mod ATR Trailing Stop Indicator for MT4 and MT5

Written by Dominic Walsh · Published · Last updated

Be clear on what ships here. The mod atr trailing stop indicator computes an average true range over fourteen bars and plots it as one line in a pane. There is no stop level, no ratcheting and no trailing logic anywhere in the source. What you get is the volatility reading a trailing stop would be built from.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window
Plots 1: ATR
Alerts popup, push notification, email, sound
Inputs 7

What the Mod ATR Trailing Stop Indicator draws on the chart

A single plot below the price chart.

`ATR` runs deep pink.

The reading never falls below zero.

No stop line appears anywhere.

No arrows or markers get drawn.

The price chart stays completely untouched.

  • ATR: plot, deep pink
mod atr trailing stop indicator: The deep pink range reading below EURUSD H1 price.
The deep pink range reading below EURUSD H1 price.

How the Mod ATR Trailing Stop Indicator calculates its values

True range per bar

Three distances compete. High to low, high to the previous close, and low to that close. Whichever is largest is the true range for that bar.

A simple average

`Period` `14` bars get added and divided. That is a plain mean rather than the Wilder smoothing the original method uses, so it reacts a little differently.

What is missing

No stop gets placed. A trailing stop would multiply this reading and ratchet a level against price. That second half does not exist in this file.

How to read the signals

The line measures size, never direction.

A rising reading means bars are growing.

Values read in price units rather than pips.

This is the number a stop distance would multiply.

Heights across two symbols mean nothing.

A quiet session drags the line toward zero.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` decides whether this tool speaks at all, and it ships on beside `EnablePopup`. Three further routes stay dark: `EnablePushNotify` forwards to your phone, `EnableEmail` mails out, and `EnableSound` sounds whatever `SoundFile` names.

Every Mod ATR Trailing Stop Indicator input

Core settings

Setting What it does Default
Period How many bars the mean covers, `14`. 14

Alert settings

Setting What it does Default
EnableAlerts Whether the tool speaks at all, `true`. on
EnablePopup Puts what it says in a MetaTrader box, `true`. on
EnablePushNotify Forwards it to your phone, `false`. off
EnableEmail Mails it out, `false`. off
EnableSound Sounds it on the desktop, `false`. off
SoundFile File the desktop sound uses, `”alert.wav”`. alert.wav
mod atr trailing stop indicator: Inputs panel, Period sitting above five message routes.
Inputs panel, Period sitting above five message routes.

Settings that fit your chart

A range reading behaves alike on any liquid market. EURUSD H1 is the reference chart, where fourteen bars spans most of a session. Drop to M5 and the line jumps at each open. Move up to daily and it tracks a fortnight.

When the Mod ATR Trailing Stop Indicator fails

The name promises a stop the source does not build.

A plain mean differs from Wilder’s smoothing.

The reading says nothing about direction.

One large bar lifts it for fourteen bars.

Copy the compiled Mod ATR Trailing Stop Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Mod ATR Trailing Stop Indicator for MT4 and MT5

The zip holds the compiled Mod ATR Trailing Stop Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Does this draw a trailing stop level?

No. The source computes an average true range and plots it, nothing more. A trailing stop needs a multiplier and a level that ratchets against price, and neither of those appears anywhere in the file.

How does Period 14 average the range?

As a plain mean of the last fourteen true ranges. Wilder’s original method smooths them instead, which weights recent bars more heavily, so this reading moves a little differently from a standard ATR.

What is the ATR plot useful for then?

Sizing. It is the number you would multiply to set a stop distance or to judge whether a move is large for current conditions, which is the same job it does inside any volatility-based tool.

Can the ATR plot ever fall below zero?

No. True range is a distance, and all three of its candidate measurements are absolute values, so the largest is always positive and a mean of positives cannot drop under zero.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Mod ATR Trailing Stop Indicator as one input. Always backtest before trading live.

Category: this is part of our Volatility collection. Browse more Volatility for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment