Goes long after a bar's low is above the prior bar's high, and short after a bar's high is below the prior bar's low. Each signal's close is averaged, and a long closes on a bear imbalance whose close is above that average.
Best run of 12. DAX 40, 2 min, spread 3, from run sweeps:2026-10-12-DAX40-2m-opt.tsv:3.
| Period | Up to 2026-10-12 |
| Instrument | DAX 40, 2 minutes |
| Spread | 3 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 |
|---|---|---|---|---|---|---|
| DAX 40Best run | 2 min | n/a | 259 | 65.25 | 2,442 EUR | -2,313 |
| USD/JPY | Daily | n/a | 11 | 90.91 | 1,415,670 USD | -665,950 |
| USD/JPY | 4 hours | n/a | 15 | 80.00 | 960,860 USD | -303,800 |
| EUR/USD | Daily | n/a | 11 | 81.82 | 56,198 USD | -51,890 |
| Silver | 1 min | n/a | 208 | 72.12 | 13,956 USD | -8,328 |
| Dow Jones | 2 min | n/a | 203 | 74.88 | 11,520 EUR | -4,891 |
| DAX 40 | 30 min | n/a | 189 | 73.54 | 11,175 EUR | -6,466 |
| Dow Jones | 5 min | n/a | 122 | 76.23 | 9,970 EUR | -8,342 |
| US Crude Oil | 10 min | n/a | 75 | 69.33 | 7,946 EUR | -5,072 |
| DAX 40 | 3 min | n/a | 192 | 69.79 | 7,818 EUR | -4,437 |
| FTSE 100 | 15 min | n/a | 195 | 73.33 | 5,928 EUR | -3,108 |
| US Crude Oil | 2 min | n/a | 207 | 69.57 | 4,396 EUR | -3,158 |
Charts
Top 10 of 12 runs. The full list is in the table above.
The code
// ============================================================== // Bar Gap Imbalance Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Pattern // Direction: Long & short // Timeframe tested: 2 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE buyavg = 0 ONCE buycount = 0 ONCE sellavg = 0 ONCE sellcount = 0
42 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 12 market and timeframe combinations. The best run by trade count was DAX 40, 2 minutes, with 259 trades.
The best run had a maximum drawdown of 2,313 EUR at the tested position size, against a net result of 2,442 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.