The system buys a green candle or sells short a red candle when its body is larger than the previous 22-bar body range. The stop sits at the signal bar's low or high, with a target at 3 times that risk.
Best run of 23. Gold, 5 min, spread 0.6, from run pf:2026-10-12-GOLD-5m.tsv:3.
| Period | Up to 2026-10-12 |
| Instrument | Gold, 5 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 | 5 min | 1.52 | 365 | 26.03 | 1,555 EUR | -360 |
| Gold | 10 min | 1.45 | 572 | 27.80 | 2,059 EUR | -402 |
| Silver | 30 min | n/a | 768 | 23.44 | 26,101 USD | -13,086 |
| Dow Jones | 1 hour | n/a | 161 | 28.57 | 16,566 EUR | -4,748 |
| Silver | 5 min | n/a | 459 | 23.09 | 12,913 USD | -6,706 |
| Dow Jones | 15 min | n/a | 559 | 26.12 | 10,832 EUR | -7,053 |
| Dow Jones | 4 hours | n/a | 35 | 31.43 | 7,918 EUR | -7,017 |
| Dow Jones | 30 min | n/a | 390 | 25.90 | 7,485 EUR | -6,332 |
| DAX 40 | 15 min | n/a | 682 | 24.78 | 6,676 EUR | -2,957 |
| Nasdaq 100 | 15 min | n/a | 812 | 26.48 | 6,514 EUR | -3,495 |
| USD/JPY | Daily | n/a | 29 | 41.38 | 5,010 USD | -1,860 |
| DAX 40 | 4 hours | n/a | 95 | 33.68 | 4,977 EUR | -4,704 |
| Dow Jones | 5 min | n/a | 549 | 25.32 | 4,698 EUR | -4,683 |
| Nasdaq 100 | 3 min | n/a | 481 | 23.91 | 2,883 EUR | -2,212 |
| S&P 500 | 1 hour | n/a | 474 | 23.00 | 2,454 EUR | -992 |
| Brent Crude | 1 min | n/a | 317 | 27.76 | 2,232 EUR | -1,907 |
| S&P 500 | 15 min | n/a | 607 | 26.69 | 2,061 EUR | -936 |
| Gold | 30 min | n/a | 765 | 24.05 | 1,681 EUR | -953 |
| S&P 500 | 5 min | n/a | 468 | 25.21 | 1,294 EUR | -766 |
| Gold | 3 min | n/a | 321 | 27.10 | 1,269 EUR | -470 |
| S&P 500 | 10 min | n/a | 561 | 24.24 | 1,022 EUR | -798 |
| S&P 500 | 3 min | n/a | 446 | 21.75 | 653 EUR | -518 |
| Gold | 15 min | n/a | 649 | 23.73 | 647 EUR | -427 |
Charts
Top 10 of 23 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Large Body Range Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 5 minutes // ============================================================== DEFPARAM CumulateOrders = false top = highest[22](max(close, open)) bot = lowest[22](min(close, open)) rangesize = top - bot body = abs(close - open)
16 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 23 market and timeframe combinations. The best run was Gold, 5 minutes, with a profit factor of 1.52 over 365 trades.
The best run had a maximum drawdown of 360 EUR at the tested position size, against a net result of 1,555 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.