Join waitlist
Strategies / Trend / SMA Slope With ADX DI Filter

SMA Slope With ADX DI Filter

Enters long when the 89-period SMA is higher than 5 bars ago, ADX(14) is above 20 and +DI is above -DI, and short on the mirror conditions. Each trade has a 0.5% stop and a 1.0% target, and a slope reversal closes the position.

TrendLong & shortIntradayUSD/JPY30 min
n/aProfit factor
544,920Net profit USD
33.30%Win rate
3,327Trades
-170,090Max drawdown
164Avg trade

Best run of 8. USD/JPY, 30 min, spread 1, from run sweeps:2026-10-04-USDJPY-30m-opt.tsv:91.

Entry rules, long

  1. ADX(14) is above 20, and +DI is above -DI.
  2. This combined state was not present on the previous bar, so the entry happens on the bar it first appears.

Entry rules, short

  1. ADX(14) is above 20, and -DI is above +DI.
  2. This combined state was not present on the previous bar, so the entry happens on the bar it first appears.

Exit rules

  1. A short closes when the SMA slope turns up, meaning it is rising now but was falling on the previous bar.
  2. Each trade has a stop 0.5% and a target 1.0% from the entry price.

Test conditions

PeriodUp to 2026-10-04
InstrumentUSD/JPY, 30 minutes
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest run30 minn/a 3,32733.30544,920 USD-170,090
USD/JPY15 minn/a 3,05132.35430,030 USD-131,970
USD/JPY10 minn/a 3,03932.44419,770 USD-131,000
USD/JPY1 hourn/a 3,01633.26330,110 USD-265,370
USD/JPYDailyn/a 45836.46249,000 USD-126,670
Dow JonesDailyn/a 46528.825,274 EUR-2,352
Dow Jones4 hoursn/a 34235.964,369 EUR-4,038
GBP/USDDailyn/a 45536.483,470 USD-1,692

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// SMA Slope With ADX DI Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 30 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

smasig = Average[89](close)

32 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

SMAADXDMI
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run SMA Slope With ADX DI Filter 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 8 market and timeframe combinations. The best run by trade count was USD/JPY, 30 minutes, with 3,327 trades.

How large was the drawdown?

The best run had a maximum drawdown of 170,090 USD at the tested position size, against a net result of 544,920 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 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