Join waitlist
Strategies / Trend / EMA Crossover Trend

EMA Crossover Trend

Buys when the 10-period exponential moving average crosses over the 20-period one, and closes the long when it crosses back under. It holds one contract, long only.

TrendLong onlySwingGoldDaily
2.01Profit factor
3,488Net profit EUR
32.21%Win rate
298Trades
-850Max drawdown
11.71Avg trade

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

Entry rules, long

Exit rules

  1. The 10-period EMA crosses under the 20-period EMA, closing the long position

Test conditions

PeriodUp to 2026-10-04
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest runDaily2.01 29832.213,488 EUR-850
Dow JonesDaily1.75 30540.3326,405 EUR-5,694
Nikkei 225Daily1.67 23435.9052,221 USD-10,039
S&P 500Daily1.62 31534.603,314 EUR-710
USD/JPYDailyn/a 28335.34861,740 USD-445,300
USD/JPY1 hourn/a 2,92631.07760,630 USD-241,970
USD/JPY30 minn/a 4,23729.74558,710 USD-182,340
EUR/USDDailyn/a 26634.9656,876 USD-44,632
Nikkei 2254 hoursn/a 58333.4521,274 USD-16,305
Nasdaq 100Dailyn/a 24536.3318,909 EUR-4,995
Dow Jones4 hoursn/a 21536.7415,635 EUR-5,755
Nasdaq 1001 hourn/a 2,51532.4513,880 EUR-3,643
DAX 40Dailyn/a 31740.0613,738 EUR-3,633
Nasdaq 1004 hoursn/a 66936.0212,382 EUR-4,679
DAX 401 hourn/a 2,37232.1711,146 EUR-3,862
DAX 4030 minn/a 4,23230.2910,233 EUR-3,616
Gold4 hoursn/a 64733.383,076 EUR-1,114
Gold1 hourn/a 2,54329.572,966 EUR-862
S&P 5004 hoursn/a 69835.391,281 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 Crossover Trend
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

fast = ExponentialAverage[10](close)
slow = 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,488.20 EUR
Net, long run3,488.20 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 Crossover Trend 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.01 over 298 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,488 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

Choppiness Filtered Trend Entry

Also a trend strategy.

2.01 PF · 128 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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