Join waitlist
Strategies / Trend / EMA 21 55 Crossover

EMA 21 55 Crossover

Buys when the 21 period EMA crosses up through the 55 period EMA. Closes the long when the 21 period EMA falls back below the 55 period EMA.

TrendLong onlyIntradayGold3 min
n/aProfit factor
1,054Net profit EUR
27.89%Win rate
1,861Trades
-639Max drawdown
0.57Avg trade

Best run of 36. Gold, 3 min, spread 0.6, from run sweeps:2026-10-04-GOLD-3m-opt.tsv:8.

Entry rules, long

  1. Signals are only checked after bar 60.

Exit rules

  1. The 21 period EMA falls below the 55 period EMA, closing the long.

Test conditions

PeriodUp to 2026-10-04
InstrumentGold, 3 minutes
Spread0.6 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run3 minn/a 1,86127.891,054 EUR-639
USD/JPYDailyn/a 10135.641,399,740 USD-477,480
USD/JPY30 minn/a 1,69631.60734,330 USD-209,550
USD/JPY10 minn/a 1,76731.07389,690 USD-120,610
USD/JPY15 minn/a 1,77030.23380,820 USD-161,870
Nikkei 225Dailyn/a 9135.1644,899 USD-15,247
Nikkei 2254 hoursn/a 23135.5032,750 USD-8,331
Nikkei 2251 hourn/a 89231.6125,632 USD-12,534
Dow JonesDailyn/a 12837.5024,022 EUR-8,131
Nasdaq 100Dailyn/a 9548.4219,642 EUR-3,201
Nikkei 2252 minn/a 1,73630.4119,163 USD-7,526
Nikkei 2253 minn/a 1,76729.8213,258 USD-7,982
Nasdaq 10030 minn/a 1,69932.9012,729 EUR-4,093
US Crude OilDailyn/a 9837.7612,036 EUR-5,799
DAX 404 hoursn/a 28133.4510,863 EUR-3,365
Nasdaq 1001 hourn/a 1,03833.8210,327 EUR-4,632
DAX 40Dailyn/a 13836.2310,178 EUR-5,478
Dow Jones1 hourn/a 35434.189,721 EUR-5,792
Nasdaq 1004 hoursn/a 28138.799,549 EUR-6,079
Dow Jones4 hoursn/a 9639.589,225 EUR-6,974
Nasdaq 1005 minn/a 1,72529.578,281 EUR-4,051
Nasdaq 10015 minn/a 1,73931.578,213 EUR-3,529
DAX 4030 minn/a 1,73931.287,966 EUR-4,767
DAX 4015 minn/a 1,73929.676,672 EUR-3,600
Brent CrudeDailyn/a 4537.786,014 EUR-5,482
S&P 500Dailyn/a 12740.164,620 EUR-1,162
DAX 4010 minn/a 1,78229.183,850 EUR-3,440
S&P 5004 hoursn/a 27737.552,867 EUR-886
Gold30 minn/a 1,70930.132,865 EUR-994
GoldDailyn/a 12634.132,840 EUR-1,306
Gold1 hourn/a 1,02532.982,758 EUR-1,235
Gold4 hoursn/a 28631.121,910 EUR-1,615
Gold15 minn/a 1,78928.171,855 EUR-798
S&P 5001 hourn/a 1,07735.751,679 EUR-1,200
Gold10 minn/a 1,81227.371,500 EUR-899
Gold5 minn/a 1,82629.571,399 EUR-940

Charts

Results by run

Top 10 of 36 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// EMA 21 55 Crossover
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 3 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE trend = -1

emaslow = ExponentialAverage[55](close)
emafast = ExponentialAverage[21](close)
prev = trend

14 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

EMA
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 639 EUR is large next to the net profit of 1,054 EUR.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run EMA 21 55 Crossover in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 36 market and timeframe combinations. The best run by trade count was Gold, 3 minutes, with 1,861 trades.

How large was the drawdown?

The best run had a maximum drawdown of 639 EUR at the tested position size, against a net result of 1,054 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs