The strategy buys at market when the stochastic reversal state is bullish and a three-bar reversal pattern is bullish, and sells short when both are bearish. Positions close when the two states disagree.
Best run of 2. Nikkei 225, Daily, spread 10, from run sweeps:2026-10-12-NIKKEI-D-opt.tsv:90.
| Period | Up to 2026-10-12 |
| Instrument | Nikkei 225, Daily |
| Spread | 10 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 |
|---|---|---|---|---|---|---|
| Nikkei 225Best run | Daily | n/a | 599 | 46.91 | 33,381 USD | -12,678 |
| Dow Jones | 4 hours | n/a | 493 | 46.65 | 11,571 EUR | -10,510 |
Charts
The code
// ============================================================== // Stochastic Reversal With Three Bar Pattern // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE posbar = 0 ll = lowest[14](low) hh = highest[14](high)
48 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 2 market and timeframe combinations. The best run by trade count was Nikkei 225, Daily, with 599 trades.
The best run had a maximum drawdown of 12,678 USD at the tested position size, against a net result of 33,381 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.