- Product type
- Trade assistant
- Platforms
- MT4 · MT5
- Market / symbol
- Gold, FX majors, FX minors, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
- Product type
- Trade assistant
- Platforms
- MT4 · MT5
- Market / symbol
- Gold, FX majors, FX minors, Indices, Crypto, Oil
- Experience level
- Intermediate
- Delivery
- File download from your dashboard
- Last update
- November 30, 2026
- Broker
- Any broker
Overview
A fixed trailing distance has one flaw: it is too wide in a quiet market and too tight in a volatile one. ATR Trailing Stop takes the distance from the market itself. The more volatile it gets, the further away the stop sits; as the market calms, the stop moves closer.
It opens no trades. It only moves the stop-loss of trades that are already open, whether placed by hand or by another robot. A button on the chart switches trailing on and off.
- Stop distance equal to ATR times a multiplier of your choice
- Optional activation threshold: after profit reaches a multiple of ATR or a number of points
- Filters by symbol, direction, magic number and comment
- Notification on every stop move
- Chart lines for the calculated stop and the activation price
It suits trend and swing traders who want to keep a winning trade open and let volatility decide where the stop goes. This is a trade-management tool and promises no profit. Find a multiplier and period that fit on a demo account first.
Source and licence
This tool is the open-source project ATR Trailing Stop by EarnForex.com, released under the Apache 2.0 licence. The source code is included in the download unchanged, with the licence text next to it. TradeKit provides the description, install guide and support. Original repository: github.com/EarnForex/ATR-Trailing-Stop
Strategy logic
Stop calculation
- ATR is read from the timeframe of the chart the tool runs on, for each trade’s own symbol. With
Shiftat 1 it uses the previous closed candle, so the value does not change mid-candle. - Buy trade: stop = Bid − (ATR ×
ATRMultiplier). - Sell trade: stop = Ask + (ATR ×
ATRMultiplier) + spread. - The stop is changed only when the new level is better than the current one, or when the trade has no stop at all. It never steps back.
- If the calculated level is closer to price than the broker’s minimum distance (Stop Level), nothing is changed.
Activation
- With the defaults, trailing works from the start, which means it also places a stop on a trade that is not yet in profit.
- With
ActivationATRMultorActivationMinProfityou can make it start only after a set amount of profit.
A note on version 1.09
- In this version’s source the point-based threshold (
ActivationMinProfit) is not applied correctly to sell trades and in practice activates at the first profit. If you need an activation threshold for sells, useActivationATRMult, which works for both directions. - Inputs and behaviour are the same on MT4 and MT5.
Specifications
Requirements
- MetaTrader 4 or MetaTrader 5
- Algo Trading enabled
- The terminal must stay open; trailing stops when it closes
- No DLL or internet access needed
- Platforms
- MT4MT5
- Delivery
- Use case
- Swing، Trend following
- Market
- Gold، FX majors، FX minors، 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 |
|---|---|---|
ATRPeriodPeriod of the ATR indicator |
14 |
Period of the ATR indicator |
ShiftCandle the ATR value is read from; 1 means the previous closed candle |
1 |
Candle the ATR value is read from; 1 means the previous closed candle |
ATRMultiplierATR multiplier for the stop distance from price |
1.0 |
ATR multiplier for the stop distance from price |
ActivationATRMultStart trailing once profit reaches this multiple of ATR; zero means no threshold |
0 |
Start trailing once profit reaches this multiple of ATR; zero means no threshold |
ActivationMinProfitStart trailing once profit reaches this many points; zero means no threshold |
0 |
Start trailing once profit reaches this many points; zero means no threshold |
OnlyCurrentSymbolWork only on trades in this chart’s symbol |
true |
Work only on trades in this chart’s symbol |
OnlyTypeAll trades, buys only or sells only |
All |
All trades, buys only or sells only |
UseMagicFilter by magic number (MagicNumber) |
false |
Filter by magic number (MagicNumber) |
UseCommentOnly trades whose comment contains the CommentFilter text |
false |
Only trades whose comment contains the CommentFilter text |
EnableTrailingParamStart with trailing enabled; otherwise you must click the chart button |
false |
Start with trailing enabled; otherwise you must click the chart button |
EnableNotifySend a notification each time the stop is moved |
false |
Send a notification each time the stop is moved |
ShowPotentialSLLinesDraw a line showing the calculated stop level |
false |
Draw a line showing the calculated stop level |
Install guide
- Unzip the download. It contains an
MQL4orMQL5folder. - In MetaTrader choose File › Open Data Folder.
- Copy the folder’s contents into the folder of the same name there. Do not skip the
Includefolder. - Restart the terminal, or right-click in Navigator and choose Refresh. The source compiles on its own.
- Drag the tool, listed as MQLTA MT4 ATR Trailing Stop (or MT5), from Expert Advisors onto a chart. That chart’s timeframe is used for ATR.
- Enable Algo Trading (AutoTrading on MT4).
- Click the button on the small chart panel to enable trailing. It is off by default.
Changelog
-
v1.09 MT4 New November 30, 2026
- Published on TradeKit
-
v1.09 MT5 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
Which timeframe is ATR taken from?
Why did it set a stop on my trade as soon as I enabled it?
What ATR multiplier should I use?
What happens if I close the terminal?
Is there a cTrader version?
Related products
More Trade assistants and tools from the same family
Risk warning