Join waitlist
Strategies / Trend / DMI Threshold Cross With ATR Stop

DMI Threshold Cross With ATR Stop

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.

TrendLong & shortSwingUSD/JPYDaily
24.44Profit factor
1,012,100Net profit USD
11.16%Win rate
242Trades
-30,970Max drawdown
4,182Avg trade

Best run of 13. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:37.

Entry rules, long

  1. DI+(14) crosses over 40.

Entry rules, short

  1. DI-(14) crosses over 40.

Exit rules

  1. A profit target sits 2% from the entry price.
  2. An opposite signal reverses the position.

Test conditions

PeriodUp to 2026-10-12
InstrumentUSD/JPY, Daily
Spread1 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
USD/JPYBest runDaily24.44 24211.161,012,100 USD-30,970
Nasdaq 1001 hourn/a 1,26219.658,871 EUR-2,470
Nikkei 22515 minn/a 1,76614.047,577 USD-5,983
Nasdaq 10030 minn/a 2,52120.597,505 EUR-4,716
Nasdaq 10010 minn/a 1,40713.505,720 EUR-3,022
Nasdaq 10015 minn/a 1,58714.055,268 EUR-2,415
Nasdaq 1004 hoursn/a 41532.052,854 EUR-2,493
Nasdaq 100Dailyn/a 19547.692,299 EUR-914
Nasdaq 1002 minn/a 1,08510.052,168 EUR-1,780
Gold30 minn/a 1,83321.881,865 EUR-871
S&P 50030 minn/a 2,11418.311,347 EUR-1,006
Gold15 minn/a 1,21813.55883 EUR-794
Gold1 hourn/a 1,09322.32753 EUR-618

Charts

Results by run

Top 10 of 13 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// 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

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

DMIATR
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 DMI Threshold Cross With ATR Stop 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 13 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 24.44 over 242 trades.

How large was the drawdown?

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.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Donchian Midline Cross With ATR Stop

Also a trend strategy.

25.61 PF · 134 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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