Buys when the +DI(14) line crosses over 40, and sells short when the -DI(14) line crosses over 40. Each trade has a stop 1.5 ATR(14) from entry and a 2% profit target.
Best run of 13. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:37.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| Spread | 1 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 |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 24.44 | 242 | 11.16 | 1,012,100 USD | -30,970 |
| Nasdaq 100 | 1 hour | n/a | 1,262 | 19.65 | 8,871 EUR | -2,470 |
| Nikkei 225 | 15 min | n/a | 1,766 | 14.04 | 7,577 USD | -5,983 |
| Nasdaq 100 | 30 min | n/a | 2,521 | 20.59 | 7,505 EUR | -4,716 |
| Nasdaq 100 | 10 min | n/a | 1,407 | 13.50 | 5,720 EUR | -3,022 |
| Nasdaq 100 | 15 min | n/a | 1,587 | 14.05 | 5,268 EUR | -2,415 |
| Nasdaq 100 | 4 hours | n/a | 415 | 32.05 | 2,854 EUR | -2,493 |
| Nasdaq 100 | Daily | n/a | 195 | 47.69 | 2,299 EUR | -914 |
| Nasdaq 100 | 2 min | n/a | 1,085 | 10.05 | 2,168 EUR | -1,780 |
| Gold | 30 min | n/a | 1,833 | 21.88 | 1,865 EUR | -871 |
| S&P 500 | 30 min | n/a | 2,114 | 18.31 | 1,347 EUR | -1,006 |
| Gold | 15 min | n/a | 1,218 | 13.55 | 883 EUR | -794 |
| Gold | 1 hour | n/a | 1,093 | 22.32 | 753 EUR | -618 |
Charts
Top 10 of 13 runs. The full list is in the table above.
The code
// ============================================================== // DMI Threshold Cross With ATR Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false dip = DIplus[14](close) dim = DIminus[14](close) myAtr = AverageTrueRange[14](close)
17 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 13 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 24.44 over 242 trades.
The best run had a maximum drawdown of 30,970 USD at the tested position size, against a net result of 1,012,100 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.