Join waitlist
Strategies / Trend / EMA 9 21 Crossover Bracket Long

EMA 9 21 Crossover Bracket Long

Buys when the 9-period EMA crosses above the 21-period EMA, with a 1% stop loss and a 2% profit target measured from the fill price. Sells to close the long when the 9-period EMA crosses below the 21-period EMA.

TrendLong onlySwingDow JonesDaily
1.59Profit factor
10,921Net profit EUR
35.65%Win rate
317Trades
-2,485Max drawdown
34.45Avg trade

Best run of 16. Dow Jones, Daily, spread 3, from run pf:2026-10-12-DOW30-D.tsv:25.

Entry rules, long

  1. The 9-period EMA crosses over the 21-period EMA

Exit rules

  1. A 1% stop loss and a 2% profit target, measured from the fill price

Test conditions

PeriodUp to 2026-10-12
InstrumentDow Jones, Daily
Spread3 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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Dow JonesBest runDaily1.59 31735.6510,921 EUR-2,485
USD/JPY1 hour1.17 3,01030.73958,770 USD-227,750
USD/JPY30 minn/a 4,36129.26626,850 USD-188,610
USD/JPYDailyn/a 29034.83450,620 USD-213,180
EUR/USDDailyn/a 27536.0035,076 USD-24,646
Nikkei 2251 hourn/a 2,17330.9217,690 USD-8,116
Nikkei 225Dailyn/a 24040.009,855 USD-2,663
DAX 401 hourn/a 2,42931.589,174 EUR-2,690
Nasdaq 1001 hourn/a 2,60431.188,566 EUR-3,672
Dow Jones1 hourn/a 90431.087,553 EUR-7,418
DAX 4030 minn/a 4,33330.125,748 EUR-3,746
GBP/USDDailyn/a 31735.025,545 USD-2,508
Gold1 hourn/a 2,61029.351,312 EUR-919
S&P 5004 hoursn/a 71834.401,186 EUR-782
Gold4 hoursn/a 66533.23984 EUR-374
S&P 500Dailyn/a 33129.91977 EUR-304

Charts

Results by run

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

DEFPARAM CumulateOrders = false

fast = ExponentialAverage[9](close)
slow = ExponentialAverage[21](close)

11 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 weaknesses2 points
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run EMA 9 21 Crossover Bracket 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 16 market and timeframe combinations. The best run was Dow Jones, Daily, with a profit factor of 1.59 over 317 trades.

How large was the drawdown?

The best run had a maximum drawdown of 2,485 EUR at the tested position size, against a net result of 10,921 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

Turtle Trade

Best run on the same market, Dow Jones.

2.42 PF · 6,324 trades

Ichimoku Cloud Confluence

Also a trend strategy.

1.59 PF · 302 trades

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

Copy trading on US indices is available to ProRealAlgos members as spots open.

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