The system buys when a stochastic-based close reversal agrees with the close sitting above its 14-period SMA, and sells short when the reversal is bearish and the close is at or below that SMA. Positions close when the states disagree.
Best run of 3. USD/JPY, Daily, spread 1, from run sweeps:2026-10-12-USDJPY-D-opt.tsv:22.
| Period | Up to 2026-10-12 |
| 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | n/a | 1,050 | 28.57 | 2,149,200 USD | -581,100 |
| Nikkei 225 | Daily | n/a | 845 | 30.89 | 27,479 USD | -13,238 |
| Brent Crude | Daily | n/a | 419 | 32.70 | 9,865 EUR | -8,901 |
Charts
The code
// ============================================================== // Reversal Pattern With Detrended Price Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Momentum // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[14](low) hh = highest[14](high)
47 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 1,050 trades.
The best run had a maximum drawdown of 581,100 USD at the tested position size, against a net result of 2,149,200 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.