Join waitlist
Strategies / Trend / EMA 8 20 Crossover Long

EMA 8 20 Crossover Long

Buys when the 8-period EMA crosses above the 20-period EMA and sells when it crosses back below. Trades one contract, long only, with no stop or target.

TrendLong onlySwingNikkei 225Daily
1.70Profit factor
56,025Net profit USD
35.61%Win rate
264Trades
-10,539Max drawdown
212Avg trade

Best run of 18. Nikkei 225, Daily, spread 10, from run pf:2026-10-10-NIKKEI-D.tsv:3.

Entry rules, long

Exit rules

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

Test conditions

PeriodUp to 2026-10-10
InstrumentNikkei 225, Daily
Spread10 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-10

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nikkei 225Best runDaily1.70 26435.6156,025 USD-10,539
Dow JonesDaily1.68 35137.8925,943 EUR-6,093
DAX 401 hour1.12 2,63532.1112,506 EUR-2,880
USD/JPY1 hourn/a 3,28230.26705,190 USD-233,550
USD/JPY30 minn/a 4,71528.84530,260 USD-185,950
EUR/USDDailyn/a 29632.7766,872 USD-39,550
Nikkei 2254 hoursn/a 63732.3422,966 USD-16,256
Nasdaq 100Dailyn/a 27236.4017,453 EUR-4,914
Dow Jones4 hoursn/a 24535.9216,148 EUR-5,775
DAX 40Dailyn/a 34140.1814,375 EUR-3,594
Nasdaq 1004 hoursn/a 74035.8111,468 EUR-5,918
Nasdaq 1001 hourn/a 2,80932.1511,331 EUR-4,298
DAX 4030 minn/a 4,71129.707,525 EUR-4,480
GoldDailyn/a 33628.273,360 EUR-869
Gold4 hoursn/a 71333.383,291 EUR-903
S&P 500Dailyn/a 37233.063,082 EUR-847
Gold1 hourn/a 2,85229.492,572 EUR-902
S&P 5004 hoursn/a 77735.011,288 EUR-1,279

Charts

Results by run

Top 10 of 18 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 8 20 Crossover Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

emafast = ExponentialAverage[8](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 barsNikkei 225 · Daily · older data 0.00 USD

Nikkei 225 had no history beyond the standard run, so both runs used 11,000 bars.

Nikkei 225 · Daily

Bars available11,000
Net, standard 200,000-bar run56,025.10 USD
Net, long run56,025.10 USD
Net on the older data alone0.00 USD
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 8 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 18 market and timeframe combinations. The best run was Nikkei 225, Daily, with a profit factor of 1.70 over 264 trades.

How large was the drawdown?

The best run had a maximum drawdown of 10,539 USD at the tested position size, against a net result of 56,025 USD.

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

Rock Climber

Best run on the same market, Nikkei 225.

1.44 PF · 1,644 trades

EMA Crossover RSI ATR Bracket

Also a trend strategy.

1.70 PF · 367 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