This Expert Advisor for MetaTrader 5 implements a trend-following strategy based on the crossover of 15-period and 60-period Exponential Moving Averages.
EMA Cross EA employs a continuous reversal logic to maintain market presence, switching between long and short positions as trends shift. Risk management includes ATR-based dynamic stop loss, fixed-point targets, and an equity-based risk percentage calculator. To filter noise, it includes a minimum gap requirement between moving averages and an anchor exit mechanism to close trades early based on price action lookbacks.
Read from EMA_Cross_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpFastEMA
int
15
快线EMA周期
InpSlowEMA
int
60
?
InpPrice
ENUM_APPLIED_PRICE
PRICE_CLOSE
应用价格
InpLotMode
ENUM_LOT_MODE
LOT_FIXED
手数模式
InpFixedLot
double
0.10
固定手数
InpRiskPercent
double
1.0
单笔风险(净值%)
InpSLPoints
int
0
硬止损(点; 0=不设, 靠反向交叉出场)
InpTPPoints
int
0
硬止盈(点; 0=不设)
InpUseGapFilter
bool
true
间距过滤开?
InpMinGapPoints
int
20
最小间距(点)
InpUseATRSL
bool
true
ATR止损开?
InpATRPeriod
int
14
ATR周期
Show all 21 inputs
Name
Type
Default
Description
InpATRMult
double
3.0
ATR倍数
InpUseAnchorExit
bool
true
锚点出场开?
InpAnchorBars
int
60
锚点回看根数
InpAnchorPnlMode
ENUM_ANCHOR_PNL_MODE
ANCHOR_ALWAYS
锚点出场生效条件
InpMagic
ulong
156001
魔术号
InpSlippage
int
30
最大滑点(点)
InpShowPanel
bool
true
显示面板
InpPanelX
int
10
面板X偏移
InpPanelY
int
30
面板Y偏移
How to Install It
1Download the sourceUse "Download source (.zip)" above, or clone momomosun/mt5-ema-cross-ea 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,