This idea buys when a three-bar bullish gap appears, with the high from two bars earlier below the current low. It sells short on the opposite gap and reverses, so it stays in the market once started.
Best run of 3. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-03-USDJPY-4h-opt.tsv:21.
| Period | Up to 2026-10-03 |
| Instrument | USD/JPY, 4 hours |
| 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 4 hours | n/a | 2,779 | 38.54 | 525,980 USD | -353,460 |
| USD/JPY | Daily | n/a | 1,278 | 35.60 | 2,450,070 USD | -1,295,710 |
| GBP/USD | Daily | n/a | 1,321 | 38.53 | 20,064 USD | -7,212 |
Charts
The code
// ============================================================== // Fair Value Gap Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false
11 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, 4 hours, with 2,779 trades.
The best run had a maximum drawdown of 353,460 USD at the tested position size, against a net result of 525,980 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.