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.
Best run of 6. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:9.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.28 | 845 | 42.49 | 2,765,270 USD | -472,660 |
| EUR/USD | Daily | n/a | 777 | 40.80 | 142,498 USD | -40,538 |
| GBP/USD | Daily | n/a | 862 | 39.56 | 12,141 USD | -7,951 |
| Brent Crude | Daily | n/a | 353 | 38.81 | 8,225 EUR | -6,787 |
| US Crude Oil | Daily | n/a | 747 | 39.76 | 7,973 EUR | -6,971 |
| Gold | Daily | n/a | 856 | 39.60 | 2,041 EUR | -1,136 |
Charts
The code
// ============================================================== // 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
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 6 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.28 over 845 trades.
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.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.