Join waitlist
Strategies / Trend / EMA 10/20 Crossover Long

EMA 10/20 Crossover Long

The system buys 1 contract when the 10-period EMA crosses above the 20-period EMA and sells when the fast average crosses back below. Signals begin after 300 bars of data.

TrendLong onlySwingGoldDaily
2.04Profit factor
3,530Net profit EUR
32.88%Win rate
292Trades
-850Max drawdown
12.09Avg trade

Best run of 19. Gold, Daily, spread 0.6, from run pf:2026-10-05-GOLD-D.tsv:4.

Entry rules, long

Exit rules

  1. The trade closes at market when the 10-period EMA crosses below the 20-period EMA.

Test conditions

PeriodUp to 2026-10-05
InstrumentGold, Daily
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-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest runDaily2.04 29232.883,530 EUR-850
Dow JonesDaily1.75 29840.2726,306 EUR-5,694
Nikkei 225Daily1.66 23035.6551,684 USD-10,039
S&P 500Daily1.63 30934.633,347 EUR-710
USD/JPYDailyn/a 27935.84929,340 USD-445,300
USD/JPY1 hourn/a 2,91831.15775,730 USD-241,970
USD/JPY30 minn/a 4,23729.74558,710 USD-182,340
EUR/USDDailyn/a 26334.2246,286 USD-44,632
Nikkei 2254 hoursn/a 57533.7421,697 USD-16,305
Nasdaq 100Dailyn/a 24136.5118,899 EUR-4,995
Dow Jones4 hoursn/a 21136.4916,239 EUR-5,755
Nasdaq 1001 hourn/a 2,51332.4313,880 EUR-3,643
DAX 40Dailyn/a 31339.9413,716 EUR-3,633
Nasdaq 1004 hoursn/a 66236.4012,578 EUR-4,679
DAX 401 hourn/a 2,36732.1511,215 EUR-3,862
DAX 4030 minn/a 4,23230.2910,233 EUR-3,616
Gold4 hoursn/a 64433.233,032 EUR-1,114
Gold1 hourn/a 2,53729.482,910 EUR-862
S&P 5004 hoursn/a 69135.601,342 EUR-1,276

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// EMA 10/20 Crossover Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

emafast = ExponentialAverage[10](close)
emaslow = ExponentialAverage[20](close)

9 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
Longer historyRe-run on up to 1,000,000 barsGold · Daily · older data 0.00 EUR

Gold had no history beyond the standard run, so both runs used 13,000 bars.

Gold · Daily

Bars available13,000
Net, standard 200,000-bar run3,530.40 EUR
Net, long run3,530.40 EUR
Net on the older data alone0.00 EUR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run EMA 10/20 Crossover Long 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 19 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 2.04 over 292 trades.

How large was the drawdown?

The best run had a maximum drawdown of 850 EUR at the tested position size, against a net result of 3,530 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

EMA 20 55 Crossover Reversal

Also a trend strategy.

2.05 PF · 212 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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