Join waitlist
Strategies / Trend / DMI Trend State Long

DMI Trend State Long

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.

TrendLong onlyIntradayNasdaq 10030 min
n/aProfit factor
12,069Net profit EUR
34.90%Win rate
5,621Trades
-5,170Max drawdown
2.15Avg trade

Best run of 22. Nasdaq 100, 30 min, spread 3, from run sweeps:2026-10-03-NAS100-30m-opt.tsv:43.

Entry rules, long

  1. This is a new bullish state, meaning the previous state was not bullish.
  2. No long position is open.

Exit rules

  1. -DI(14) is above +DI(14) and above 23, and this is a new bearish state, closing the long.

Test conditions

PeriodUp to 2026-10-03
InstrumentNasdaq 100, 30 minutes
Spread3 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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run30 minn/a 5,62134.9012,069 EUR-5,170
USD/JPYDailyn/a 42830.61562,840 USD-461,900
USD/JPY1 hourn/a 2,87733.33526,070 USD-163,910
USD/JPY30 minn/a 4,30831.22264,210 USD-181,120
Nikkei 225Dailyn/a 44231.2234,204 USD-12,648
EUR/USDDailyn/a 41530.6033,048 USD-31,145
Nikkei 2254 hoursn/a 70835.3123,859 USD-8,983
SilverDailyn/a 41929.5922,441 USD-20,665
Dow JonesDailyn/a 39335.8820,935 EUR-6,155
Dow Jones4 hoursn/a 30339.9315,279 EUR-5,185
Dow Jones1 hourn/a 98434.7612,387 EUR-5,750
Nasdaq 100Dailyn/a 44035.0012,131 EUR-4,893
Nasdaq 1004 hoursn/a 94635.5210,571 EUR-5,100
DAX 40Dailyn/a 65733.039,684 EUR-5,371
Nasdaq 1001 hourn/a 3,05532.968,875 EUR-4,394
DAX 401 hourn/a 2,84432.568,169 EUR-5,868
DAX 404 hoursn/a 87835.767,652 EUR-3,690
Gold30 minn/a 4,85034.123,078 EUR-1,558
Gold4 hoursn/a 81234.732,977 EUR-838
Gold1 hourn/a 2,65931.441,917 EUR-741
S&P 500Dailyn/a 51334.501,914 EUR-1,108
S&P 5004 hoursn/a 93336.551,542 EUR-1,070

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

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

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

DMI
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.

Questions

About this strategy

Can I run DMI Trend State Long 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 22 market and timeframe combinations. The best run by trade count was Nasdaq 100, 30 minutes, with 5,621 trades.

How large was the drawdown?

The best run had a maximum drawdown of 5,170 EUR at the tested position size, against a net result of 12,069 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

DMI Trend Breakout Long

Uses the same indicator.

1.33 PF · 1,998 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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