Goes long when the 21-period EMA crosses above the 55-period EMA and short when it crosses below. Each trade has a stop-loss 1.5 times the 14-period ATR away and a profit target 1 ATR away.
Best run of 5. Dow Jones, Daily, spread 3, from run sweeps:2026-10-11-DOW30-D-opt.tsv:84.
| Period | Up to 2026-10-11 |
| Instrument | Dow Jones, Daily |
| Spread | 3 points |
| Starting capital | 1,000,000 |
| Costs | Spread only. Commissions and overnight financing are not included. |
| Bars | Up to 200,000 bars, fewer where the instrument has less history |
| Last tested | 2026-10-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Dow JonesBest run | Daily | n/a | 257 | 63.81 | 4,874 EUR | -3,083 |
| US Crude Oil | Daily | n/a | 196 | 63.78 | 3,557 EUR | -1,499 |
| Brent Crude | Daily | n/a | 90 | 65.56 | 3,299 EUR | -1,014 |
| Dow Jones | 4 hours | n/a | 193 | 63.21 | 3,072 EUR | -2,580 |
| Nasdaq 100 | Daily | n/a | 190 | 57.89 | 2,442 EUR | -1,259 |
Charts
The code
// ============================================================== // EMA Crossover With ATR Bracket (long and short) 3 // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fast = ExponentialAverage[21](close) slow = ExponentialAverage[55](close) myAtr = AverageTrueRange[14](close)
13 more lines: the entry and exit rules.
Setup
Questions
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.
It was tested on 5 market and timeframe combinations. The best run by trade count was Dow Jones, Daily, with 257 trades.
The best run had a maximum drawdown of 3,083 EUR at the tested position size, against a net result of 4,874 EUR.
It trades both long and short.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.