XAU Trailing Stop offers two distinct operational modes: a fixed pips distance and an adaptive mode based on the Average True Range indicator to adjust for volatility. The utility includes specific safeguards to block order modifications during periods of high spread or slippage, commonly seen during news events. It allows users to set a minimum profit threshold and a trailing step to lock in gains efficiently without manual intervention.
Read from XAU_TrailingStop.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpSymbol
string
XAUUSD
Simbol Trading
InpMagicNumber
int
202608
Magic Number Posisi
InpBuyOrders
bool
true
Trailing Posisi BUY
InpSellOrders
bool
true
Trailing Posisi SELL
InpTrailMode
ENUM_TRAIL_MODE
TRAIL_ATR_ADAPTIVE
Mode Algoritma Trailing
InpTrailingStop
double
150.0
Jarak Trailing Fixed (Pips)
InpTrailingStep
double
30.0
Step Minimum Geser SL (Pips)
InpMinProfit
double
50.0
Minimum Profit Sebelum Aktif (Pips)
InpMaxSpread
int
45
Maksimum Spread Diizinkan (Points)
InpMaxSlippage
ulong
30
Toleransi Maksimum Slippage (Points)
InpAtrTimeframe
ENUM_TIMEFRAMES
PERIOD_H1
Timeframe ATR
InpAtrPeriod
int
14
Periode ATR
Show all 15 inputs
Name
Type
Default
Description
InpAtrMultiplier
double
1.5
Multiplier Volatilitas ATR
InpMinTrailPips
double
80.0
Batas Bawah Jarak ATR (Pips)
InpMaxTrailPips
double
400.0
Batas Atas Jarak ATR (Pips)
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone admininfokoding/mql5-xauusd-trailing-stop from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
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
This trade manager for MetaTrader 4 and 5 automatically adjusts the stop-loss levels of open positions using the Average True Range indicator. It 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
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