DINEXSPACEXAUUSD SpecialistEAs available to rentCustom EA: Strategy → Code → BacktestView rentable EA bots
01ILLUSTRATIVE

EMA crossover

A fast/slow EMA crossover to catch trend waves.

MetaTrader 5 H1 timeframe

EA Bots running on live accounts

See the XAUUSD bot profiles, backtest reports and how to follow the MT5 accounts.

See the list of running EA Bots →

This section is only available for EAs with a real profile — see above.

How to use the strategy

Use it when the market has a clear trend; avoid narrow sideways periods. Enter when the fast EMA crosses the slow EMA, exit when it crosses back.

Full parameters
MA_FAST=20MA_SLOW=50SL_PCT=2TP_PCT=6

How it works

Two moving averages run side by side, one fast and one slow. When the fast line crosses above the slow line, the system treats it as a forming uptrend and buys; a cross below works the other way. It is one of the oldest mechanisms and also one of the easiest to understand.

What each parameter means

MA_FAST 20
The fast line is calculated over 20 candles. Lowering it brings signals earlier but with more noise.
MA_SLOW 50
The slow line is calculated over 50 candles and acts as the baseline trend.
SL_PCT 2
Stop-loss at 2% from the entry price.
TP_PCT 6
Take-profit at 6%, a reward-to-risk ratio of 3 to 1.

When it fits, when it struggles

Fits when: The market trends long enough for the fast and slow lines to separate clearly.

Struggles when: The market moves sideways in a narrow range. The two lines keep crossing back and forth, producing a run of false signals, and every signal costs fees.

Common mistakes

Shortening both periods to catch signals earlier. That only increases how often the lines cross, not how often they are right.

To judge a strategy by its numbers rather than its description, read the six numbers to check in a backtest report.

Checking your sign-in…

Data labeled ILLUSTRATIVE is only used to simulate the interface and does not represent actual trading results.

EMA crossover — Sample strategy | DinexSpace