ATR Trailing Stop allows users to define the trailing distance through a configurable ATR period and multiplier. The expert advisor includes filtering logic to apply the trailing stop only to specific symbols, magic numbers, or trade directions. It provides activation settings based on minimum profit or ATR multiples to ensure the trail starts at the desired price level. The tool features a graphical panel and visual lines to display potential stop-loss locations.
Read from MQLTA MT5 ATR Trailing Stop.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
Comment_1
string
====================
Expert Advisor Settings
ATRPeriod
int
14
ATR Period
Shift
int
1
Shift In The ATR Value (1=Previous Candle)
ATRMultiplier
double
1.0
ATR Multiplier
ActivationATRMult
double
0
Activation threshold (in ATR multiples)
ActivationMinProfit
int
0
Activation threshold (in points)
Comment_2
string
====================
Orders Filtering Options
OnlyCurrentSymbol
bool
true
Apply To Current Symbol Only
OnlyType
ENUM_CONSIDER
All
Apply To
UseMagic
bool
false
Filter By Magic Number
MagicNumber
int
0
Magic Number (if above is true)
UseComment
bool
false
Filter By Comment
Show all 37 inputs
Name
Type
Default
Description
CommentFilter
string
Comment (if above is true)
EnableTrailingParam
bool
false
Enable Trailing Stop
Comment_3
string
====================
Notification Options
EnableNotify
bool
false
Enable Notifications feature
SendAlert
bool
true
Send Alert Notification
SendApp
bool
true
Send Notification to Mobile
SendEmail
bool
true
Send Notification via Email
Comment_3a
string
====================
Graphical Window
ShowPanel
bool
true
Show Graphical Panel
ExpertName
string
MQLTA-ATRTS
Expert Name (to name the objects)
Xoff
int
20
Horizontal spacing for the control panel
Yoff
int
20
Vertical spacing for the control panel
Comment_4
string
====================
Potential Stop-Loss Lines
ShowPotentialSLLines
bool
false
Show Potential SL Lines
PotentialSLBuyColor
color
clrDodgerBlue
Potential Buy SL Line Color
PotentialSLSellColor
color
clrOrangeRed
Potential Sell SL Line Color
PotentialSLStyle
ENUM_LINE_STYLE
STYLE_DOT
Potential SL Line Style
PotentialSLWidth
int
1
Potential SL Line Width
Comment_5
string
====================
Activation Lines
ShowActivationLines
bool
false
Show Activation Lines
ActivationBuyColor
color
clrDarkGray
Activation Buy Line Color
ActivationSellColor
color
clrDarkSlateGray
Activation Sell Line Color
ActivationStyle
ENUM_LINE_STYLE
STYLE_DASH
Activation Line Style
ActivationWidth
int
1
Activation Line Width
ActivationFontSize
int
8
Activation Label Font Size
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone EarnForex/ATR-Trailing-Stop from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts or MQL5/Experts.
3Copy the filesCopy the .mq4 / .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.
This MetaTrader expert advisor functions as a trade manager that automates stop loss adjustments for existing positions. It specifically waits until a trade reaches a user-defined profit threshold in points before initiating a trailing stop. The tool includes flexible filtering options to manage specific symbols, magic
Trader Pad is a trade management utility for MetaTrader 5 designed to automate position exits and risk control after an entry is initiated. The software handles stop-loss and take-profit placement in ticks, providing advanced trailing stop logic and break-even functionality. It allows users to scale out of positions th
PSAR Trailing Stop is a management utility for MetaTrader 4 and 5 that automates the adjustment of stop-loss levels for open positions. Instead of manual movement, it follows the Parabolic SAR indicator values to lock in profits or minimize losses as a trend progresses. The software includes filtering options to target
This expert advisor is a utility for MetaTrader 4 and MetaTrader 5 designed to manage stop-loss levels for existing trades. It utilizes Bill Williams' Fractals indicator to dynamically adjust the stop loss as new fractal points form on the chart. Users can configure the number of bars to scan and specify which fractal
This visual trade management utility for MetaTrader 5 assists manual traders with order execution and risk management. It features interactive chart lines for entry, stop loss, and take profit levels, allowing for drag-and-drop price adjustments. The system automatically calculates position sizes based on a defined per
PATI Trading Assistant is a MetaTrader 4 utility designed to facilitate trade management and bookkeeping based on the PATI trading methodology. It automates the placement of stop losses and take profits, specifically managing range breakout and pullback setups. The EA includes risk controls such as the Two Minute Rule