Join waitlist
Strategies / Breakout / Prior Bar Breakout With ADX Filter

Prior Bar Breakout With ADX Filter

The strategy buys when the close breaks above the prior bar's high during an uptrend, with the 20-period EMA above the 50-period EMA and ADX at least 12. It sells short on the mirror breakdown below the prior low, with ATR-based stops and targets.

BreakoutLong & shortSwingUSD/JPYDaily
1.28Profit factor
2,765,270Net profit USD
42.49%Win rate
845Trades
-472,660Max drawdown
3,273Avg trade

Best run of 6. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:9.

Entry rules, long

  1. The 20-period EMA is above the 50-period EMA, and the close is above the 20-period EMA
  2. ADX(14) is at least 12

Entry rules, short

  1. The 20-period EMA is below the 50-period EMA, and the close is below the 20-period EMA
  2. ADX(14) is at least 12

Exit rules

  1. A long is closed at market when a bar closes at or below the stop or at or above the target
  2. A short is closed at market when a bar closes at or above the stop or at or below the target
  3. An opposite signal reverses the position

Test conditions

PeriodUp to 2026-10-04
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.28 84542.492,765,270 USD-472,660
EUR/USDDailyn/a 77740.80142,498 USD-40,538
GBP/USDDailyn/a 86239.5612,141 USD-7,951
Brent CrudeDailyn/a 35338.818,225 EUR-6,787
US Crude OilDailyn/a 74739.767,973 EUR-6,971
GoldDailyn/a 85639.602,041 EUR-1,136

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Prior Bar Breakout With ADX Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Breakout
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE longsl = 0
ONCE longtp = 0
ONCE shortsl = 0
ONCE shorttp = 0

emafast = ExponentialAverage[20](close)
emaslow = ExponentialAverage[50](close)
myAtr = AverageTrueRange[14](close)
myAdx = ADX[14]

35 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

EMAADXATR
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 Prior Bar Breakout With ADX 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 6 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.28 over 845 trades.

How large was the drawdown?

The best run had a maximum drawdown of 472,660 USD at the tested position size, against a net result of 2,765,270 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Reversal Pattern With Chaikin Volatility

Uses the same indicator.

2.26 PF · 6,872 trades

Trend Surfer

Best run on the same market, USD/JPY.

1.04 PF · 10,813 trades

Kumo ATR Breakout

Also a breakout strategy.

1.29 PF · 383 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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