The strategy holds one long contract while EMA(12) is above EMA(26) and the EMA(2) of the average price differs from EMA(12). It closes the long when that state ends.
Best run of 24. Nasdaq 100, Daily, spread 3, from run pf:2026-10-12-NAS100-D.tsv:12.
| Period | Up to 2026-10-12 |
| Instrument | Nasdaq 100, 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | Daily | 2.46 | 187 | 43.32 | 21,117 EUR | -3,422 |
| Gold | Daily | 2.30 | 241 | 31.54 | 3,740 EUR | -809 |
| S&P 500 | Daily | 1.98 | 260 | 35.38 | 4,113 EUR | -735 |
| Dow Jones | Daily | 1.93 | 255 | 36.08 | 28,389 EUR | -6,165 |
| DAX 40 | Daily | 1.63 | 240 | 37.92 | 14,859 EUR | -3,429 |
| USD/JPY | 30 min | 1.14 | 3,343 | 30.24 | 696,410 USD | -171,200 |
| USD/JPY | Daily | n/a | 218 | 36.70 | 1,249,310 USD | -485,700 |
| USD/JPY | 1 hour | n/a | 2,342 | 31.21 | 635,650 USD | -217,260 |
| USD/JPY | 10 min | n/a | 3,532 | 29.13 | 187,470 USD | -154,010 |
| EUR/USD | Daily | n/a | 203 | 36.45 | 91,356 USD | -47,880 |
| Nikkei 225 | Daily | n/a | 196 | 34.18 | 36,532 USD | -13,365 |
| Nikkei 225 | 4 hours | n/a | 467 | 32.98 | 21,121 USD | -15,009 |
| Dow Jones | 4 hours | n/a | 182 | 36.26 | 13,500 EUR | -4,750 |
| US Crude Oil | Daily | n/a | 195 | 38.46 | 11,018 EUR | -7,512 |
| Nasdaq 100 | 30 min | n/a | 3,374 | 32.28 | 10,740 EUR | -3,615 |
| Nasdaq 100 | 1 hour | n/a | 2,013 | 32.14 | 10,495 EUR | -3,846 |
| Nasdaq 100 | 4 hours | n/a | 573 | 35.78 | 9,503 EUR | -5,336 |
| DAX 40 | 30 min | n/a | 3,422 | 30.19 | 8,970 EUR | -4,179 |
| DAX 40 | 1 hour | n/a | 1,921 | 31.86 | 7,678 EUR | -4,219 |
| Gold | 4 hours | n/a | 510 | 35.29 | 3,306 EUR | -1,051 |
| Gold | 1 hour | n/a | 1,999 | 30.47 | 3,069 EUR | -921 |
| S&P 500 | 4 hours | n/a | 548 | 37.59 | 2,985 EUR | -801 |
| Gold | 30 min | n/a | 3,436 | 29.28 | 1,976 EUR | -913 |
| Gold | 5 min | n/a | 3,524 | 28.72 | 706 EUR | -557 |
Charts
Top 10 of 24 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // EMA Trend State Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false fastma = ExponentialAverage[12](close) slowma = ExponentialAverage[26](close) apc = ExponentialAverage[2](TotalPrice)
12 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 24 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.46 over 187 trades.
The best run had a maximum drawdown of 3,422 EUR at the tested position size, against a net result of 21,117 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.