The strategy buys after a large outside bar closes below the prior low, and sells short after one closes above the prior high. Each trade has a 2 ATR stop and exits at the first close in profit.
Best run of 3. USD/JPY, Daily, spread 1, from run sweeps:2026-10-11-USDJPY-D-opt.tsv:155.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | n/a | 763 | 5.24 | 234,360 USD | -74,840 |
| Nikkei 225 | Daily | n/a | 638 | 76.49 | 18,124 USD | -6,700 |
| Dow Jones | Daily | n/a | 504 | 78.17 | 8,962 EUR | -6,657 |
Charts
The code
// ============================================================== // Outside Bar Reversal Stop // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false myAtr = AverageTrueRange[14](close) buffer = myAtr * 2
27 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 3 market and timeframe combinations. The best run by trade count was USD/JPY, Daily, with 763 trades.
The best run had a maximum drawdown of 74,840 USD at the tested position size, against a net result of 234,360 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.