The system finds recent fair value gaps larger than 0.25 times the 200-period ATR, then averages their edges across recent bars. It buys when close crosses above the average bearish gap level with both averages above EMA(200), and sells short on the mirror setup.
Best run of 7. Gold, 15 min, spread 0.6, from run sweeps:2026-10-12-GOLD-15m-opt.tsv:21.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 15 minutes |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | 15 min | n/a | 1,786 | 38.47 | 1,046 EUR | -608 |
| Nikkei 225 | Daily | n/a | 152 | 46.71 | 30,080 USD | -12,514 |
| Nasdaq 100 | 4 hours | n/a | 332 | 39.76 | 4,688 EUR | -3,415 |
| S&P 500 | Daily | n/a | 190 | 47.37 | 3,055 EUR | -828 |
| Gold | Daily | n/a | 168 | 51.79 | 1,742 EUR | -1,327 |
| Gold | 4 hours | n/a | 285 | 46.67 | 1,415 EUR | -933 |
| Gold | 30 min | n/a | 1,722 | 37.86 | 1,059 EUR | -841 |
Charts
The code
// ============================================================== // Fair Value Gap Average Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 15 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE fvgup = 0 ONCE fvgdn = 0 ONCE upavg = 0 ONCE dnavg = 0 ONCE upok = 0 ONCE dnok = 0 myAtr = AverageTrueRange[200](close) * 0.25
59 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 Gold, 15 minutes, with 1,786 trades.
The best run had a maximum drawdown of 608 EUR at the tested position size, against a net result of 1,046 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.