The system buys when a stochastic-based close reversal agrees with a bar that trades entirely above the previous week's high, and sells short when the bar trades entirely below the previous week's low. Positions close when the states disagree.
Best run of 7. USD/JPY, 10 min, spread 1, from run sweeps:2026-10-12-USDJPY-10m-opt.tsv:3.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, 10 minutes |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 10 min | n/a | 1,246 | 38.92 | 383,220 USD | -163,500 |
| USD/JPY | Daily | n/a | 291 | 38.49 | 1,715,560 USD | -806,900 |
| Nikkei 225 | Daily | n/a | 267 | 40.45 | 29,671 USD | -17,088 |
| Nikkei 225 | 1 hour | n/a | 722 | 38.09 | 14,025 USD | -12,052 |
| Brent Crude | Daily | n/a | 117 | 41.88 | 8,835 EUR | -8,175 |
| Nasdaq 100 | Daily | n/a | 260 | 38.08 | 6,117 EUR | -5,103 |
| Gold | Daily | n/a | 327 | 34.86 | 1,501 EUR | -1,201 |
Charts
The code
// ============================================================== // Reversal Pattern With Weekly Range Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE posc = 0 ONCE sincebad = 1000 TIMEFRAME(weekly) wh = high[1] wl = low[1] TIMEFRAME(default) ll = lowest[14](low) hh = highest[14](high)
49 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 7 market and timeframe combinations. The best run by trade count was USD/JPY, 10 minutes, with 1,246 trades.
The best run had a maximum drawdown of 163,500 USD at the tested position size, against a net result of 383,220 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.