MA Crossover Trend EA
- Uzmanlar
- Sürüm: 5.13
- Etkinleştirmeler: 10
MA Crossover Trend EA — trend-following Expert Advisor for MetaTrader 5, built on the classic moving average crossover. Default settings are configured for USDJPY on the M30 timeframe.
At a glance
- Default chart: USDJPY M30 — attach the EA and test as-is, no set file needed.
- Strategy Tester backtest with default settings (real ticks, 2021.01.01 – 2026.11.26, $10,000 deposit): 333 trades, profit factor 1.89, maximum equity drawdown 1.46%. Full details in the "Backtest results" section below; screenshots are on this page.
- Risk controls: fixed stop loss on every trade, optional equity guard (close all positions at a set equity drop), 24 hourly entry checkboxes plus weekday switches.
- No martingale, no grid. Optional pyramiding is OFF by default.
Entry logic (evaluated on closed bars only)
- Buy: the short moving average crosses above the long moving average.
- Sell: the short moving average crosses below the long moving average.
- An open position is closed when the opposite crossover appears. A new position in the opposite direction is opened only by a later entry signal.
Optional filters (all can be switched off)
- Trend MA filter (e.g. EMA 200): buys only above the trend MA, sells only below.
- Trend distance filter: blocks entries when the price is too far from the trend MA.
- RSI filter with rising/falling confirmation.
- MACD filter with multi-bar confirmation.
- Bollinger Bands filter: breakout mode or minimum band width mode.
- Volume filter: relative to the average of N bars, or spike vs the previous bar.
Risk management — including prop-firm style controls
- Stop loss / take profit by percent of price, by ATR multiple, or by fixed points. Every position has a stop loss.
- Optional equity guard: closes all positions of this EA when equity drops by a set percentage from the starting or peak equity — use it as a hard daily/overall loss limit.
- Time filter with 24 hourly checkboxes and weekday switches (server time): disable entries at specific hours or on specific days (for example weekends or major news hours).
- Trailing stop (per tick or on bar close) and breakeven.
- Optional pyramiding: adds one extra position when the price moves against the entry by a set percentage (OFF by default).
- Lot size is normalized to the broker minimum/maximum/step; order filling mode is detected automatically.
Default settings
- Default inputs are configured for USDJPY M30 (EMA 20/34 crossover with EMA 100 trend filter, SL 0.5% / TP 2% of price, trailing stop 1%, breakeven on, Bollinger Bands breakout filter and RSI filter enabled), so you can test the EA with default inputs on a USDJPY M30 chart as-is.
Backtest results (Strategy Tester)
The screenshots show a Strategy Tester run with the EA's default settings - no optimization, no changed inputs:
- Symbol / timeframe: USDJPY M30
- Period: 2021.01.01 - 2026.11.26
- Modelling: real ticks, history quality 93%
- Deposit: $10,000, leverage 1:100, fixed lot 0.05
- Total trades: 333 (179 long, 154 short), win rate 42.9%
- Profit factor: 1.89
- Net profit: $3,125
- Maximum equity drawdown: $195 (1.46% of the deposit)
- Recovery factor: 16.05
You can reproduce this test with the free demo: run the EA in the Strategy Tester on USDJPY M30 with the default settings, real ticks, over the same period. Results on other brokers will differ because of feed, spread and swap differences.
These are backtest results on historical data, not real trading results. Past performance in the tester does not guarantee future results. Always test on your own broker's data and start with a demo account.
Notes
- Works on any symbol and timeframe (best on XAUUSD, USDJPY and ETHUSD); the EA trades the chart it is attached to. For other symbols/timeframes, re-optimize the parameters.
- Recommended: test in the Strategy Tester with real ticks and optimize on your own broker's data before live use.
- Example set files for XAUUSD H1 are available from the author on request. Past backtest results do not guarantee future performance.
