Gold Trend Confirm Lock waits for a fast smoothed moving average pullback and a confirming candle that closes with the trend, then opens one market order. Stop loss sits beyond the pullback wick, with a minimum ATR distance and a default maximum of 15 price units that can be clamped. A profit lock moves the stop once price advances, and the position can also exit when the moving average reverses or after 96 M15 bars. Default volume is a fixed lot, with optional percent risk. Fixed take profit and trailing are present but off by default.
Read from 17_Trend_Lock.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpTradeSymbol
string
XAUUSDm
InpMagicNumber
ulong
999893
InpSignalTimeframe
ENUM_TIMEFRAMES
PERIOD_M15
InpMATimeframe
ENUM_TIMEFRAMES
PERIOD_M30
InpMAMethod
ENUM_MA_METHOD
MODE_SMMA
InpFastMAPeriod
int
20
InpSlowMAPeriod
int
50
InpMinMAGapATR
double
0.20
InpSlopeBars
int
3
InpATRPeriod
int
14
InpUseHTFFilter
bool
false
InpHTFTimeframe
ENUM_TIMEFRAMES
PERIOD_H1
Show all 40 inputs
Name
Type
Default
Description
InpHTFMAPeriod
int
50
InpRequirePullback
bool
true
InpPullbackBars
int
5
InpPullbackTouchATR
double
0.10
InpMinBodyRatio
double
0.50
InpMinBodyATR
double
0.40
InpRequireBreakPrevious
bool
true
InpSLBufferATR
double
0.10
InpMinRiskATR
double
0.50
InpMaxSLPrice
double
15.0
InpOverMaxSLAction
ENUM_OVER_SL_ACTION
OVER_SL_CLAMP
InpUseMATrendExit
bool
true
InpMAExitConfirmBars
int
3
InpMAExitGapATR
double
0.10
InpUseFixedTP
bool
false
InpRewardRisk
double
2.0
InpUseTrailing
bool
false
InpTrailStartR
double
2.0
InpTrailATR
double
1.5
InpHoldBarsLimit
int
96
InpUseProfitLock
bool
true
InpLockTriggerPrice
double
20.0
InpLockProfitPrice
double
10.0
InpLockStepPrice
double
0.0
InpLockStepAddPrice
double
0.0
InpLotSize
double
0.01
InpRiskPercent
double
0.0
InpMaxSpread
double
1.0
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone LiinIT/Bot-EA17-Trading-Gold_TrendConfirmLock_v1 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.
EA31337 is a comprehensive multi-strategy trading robot and framework for MetaTrader platforms. It features dozens of pre-built strategies utilizing technical indicators like ATR, Moving Averages, and SuperTrend. The system manages entries and exits through a unique filtering system that monitors account metrics, volat
EA Scalper XAUUSD is an automated trading research project for MetaTrader 5 focused on gold. It employs a multifaceted entry strategy using Smart Money Concepts like order blocks and liquidity sweeps, alongside moving average crossovers and Fibonacci zones. The EA includes a self-learning module designed to adapt to di
EA31337 Libre is an open-source, multi-strategy trading robot for MetaTrader 4 and MetaTrader 5. It functions as a simplified implementation of the EA31337 framework, providing a collection of over 35 built-in strategies based on technical indicators. The expert advisor performs independent market analysis across vario
Ladino Bot is an open-source expert advisor for MetaTrader 5 that uses HiLo Activator indicators and moving average crossovers to identify trade entries. It features a triple-timeframe architecture, allowing users to align entries with higher-period trends. Risk controls include daily gain and loss caps, brokerage fee
Gold Trader EA is a multi-strategy expert advisor designed for trading XAUUSD on the MetaTrader 5 platform. It employs a fusion engine that combines up to 14 different technical analysis methods, including candlestick patterns, chart patterns, price action, and institutional levels. The system requires a user-defined n
This MetaTrader 5 expert advisor automates the 9.1 trading setup popularized by Larry Williams, utilizing an exponential moving average to detect trend shifts. It enters trades based on price action relative to the moving average slope. The system includes built-in trade management features like partial profit taking,