The idea buys when +DI(14) moves above -DI(14) and above 23.5, and sells the long when -DI(14) moves above +DI(14) and above 23. Signals fire only on the bar the trend state changes.
Best run of 22. Nasdaq 100, 30 min, spread 3, from run sweeps:2026-10-03-NAS100-30m-opt.tsv:43.
| Period | Up to 2026-10-03 |
| Instrument | Nasdaq 100, 30 minutes |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Nasdaq 100Best run | 30 min | n/a | 5,621 | 34.90 | 12,069 EUR | -5,170 |
| USD/JPY | Daily | n/a | 428 | 30.61 | 562,840 USD | -461,900 |
| USD/JPY | 1 hour | n/a | 2,877 | 33.33 | 526,070 USD | -163,910 |
| USD/JPY | 30 min | n/a | 4,308 | 31.22 | 264,210 USD | -181,120 |
| Nikkei 225 | Daily | n/a | 442 | 31.22 | 34,204 USD | -12,648 |
| EUR/USD | Daily | n/a | 415 | 30.60 | 33,048 USD | -31,145 |
| Nikkei 225 | 4 hours | n/a | 708 | 35.31 | 23,859 USD | -8,983 |
| Silver | Daily | n/a | 419 | 29.59 | 22,441 USD | -20,665 |
| Dow Jones | Daily | n/a | 393 | 35.88 | 20,935 EUR | -6,155 |
| Dow Jones | 4 hours | n/a | 303 | 39.93 | 15,279 EUR | -5,185 |
| Dow Jones | 1 hour | n/a | 984 | 34.76 | 12,387 EUR | -5,750 |
| Nasdaq 100 | Daily | n/a | 440 | 35.00 | 12,131 EUR | -4,893 |
| Nasdaq 100 | 4 hours | n/a | 946 | 35.52 | 10,571 EUR | -5,100 |
| DAX 40 | Daily | n/a | 657 | 33.03 | 9,684 EUR | -5,371 |
| Nasdaq 100 | 1 hour | n/a | 3,055 | 32.96 | 8,875 EUR | -4,394 |
| DAX 40 | 1 hour | n/a | 2,844 | 32.56 | 8,169 EUR | -5,868 |
| DAX 40 | 4 hours | n/a | 878 | 35.76 | 7,652 EUR | -3,690 |
| Gold | 30 min | n/a | 4,850 | 34.12 | 3,078 EUR | -1,558 |
| Gold | 4 hours | n/a | 812 | 34.73 | 2,977 EUR | -838 |
| Gold | 1 hour | n/a | 2,659 | 31.44 | 1,917 EUR | -741 |
| S&P 500 | Daily | n/a | 513 | 34.50 | 1,914 EUR | -1,108 |
| S&P 500 | 4 hours | n/a | 933 | 36.55 | 1,542 EUR | -1,070 |
Charts
Top 10 of 22 runs. The full list is in the table above.
The code
// ============================================================== // DMI Trend State Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 30 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE state = 0 myDiplus = DIplus[14](close) myDiminus = DIminus[14](close)
18 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 22 market and timeframe combinations. The best run by trade count was Nasdaq 100, 30 minutes, with 5,621 trades.
The best run had a maximum drawdown of 5,170 EUR at the tested position size, against a net result of 12,069 EUR.
It only takes long trades.
Related
Copy trading on US indices is available to ProRealAlgos members as spots open.