Buys when a reversal pattern on closing prices and a close above the close 40 bars earlier both point up, and sells short when both point down. Any open position is closed when the two signals disagree.
Best run of 4. USD/JPY, Daily, spread 1, from run sweeps:2026-10-12-USDJPY-D-opt.tsv:16.
| 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 | 550 | 33.09 | 1,955,800 USD | -576,200 |
| Brent Crude | Daily | n/a | 218 | 31.19 | 16,785 EUR | -5,863 |
| US Crude Oil | Daily | n/a | 443 | 35.21 | 13,881 EUR | -7,035 |
| Gold | Daily | n/a | 547 | 32.36 | 2,835 EUR | -809 |
Charts
The code
// ============================================================== // Reversal With Lagged Close Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE posrev = 0 ONCE sincebad = 1000 ONCE postwo = 0 ll = lowest[15](low) hh = highest[15](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 4 market and timeframe combinations. The best run by trade count was USD/JPY, Daily, with 550 trades.
The best run had a maximum drawdown of 576,200 USD at the tested position size, against a net result of 1,955,800 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.