The system marks the high and low of each bar where ATR(20) is compressed against its 40-bar average. It buys when the close crosses above the stored high, or sells short when it crosses below the stored low, once volatility expands.
Best run of 8. Silver, 4 hours, spread 2, from run pf:2026-10-05-SILVER-4h.tsv:3.
| Period | Up to 2026-10-05 |
| Instrument | Silver, 4 hours |
| Spread | 2 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-05 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| SilverBest run | 4 hours | 4.53 | 458 | 34.06 | 181,950 USD | -5,481 |
| Silver | Daily | n/a | 140 | 40.00 | 12,178 USD | -3,501 |
| Brent Crude | Daily | n/a | 48 | 43.75 | 4,279 EUR | -1,509 |
| US Crude Oil | Daily | n/a | 116 | 36.21 | 3,846 EUR | -2,141 |
| DAX 40 | 15 min | n/a | 3,033 | 33.23 | 2,632 EUR | -2,268 |
| S&P 500 | Daily | n/a | 171 | 36.84 | 1,239 EUR | -401 |
| Gold | 4 hours | n/a | 517 | 34.24 | 929 EUR | -402 |
| S&P 500 | 4 hours | n/a | 488 | 33.40 | 859 EUR | -834 |
Charts
The code
// ============================================================== // Volatility Expansion Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE bh = 0 ONCE bl = 0 ONCE bhset = 0 ONCE blset = 0 myAtr = AverageTrueRange[20](close) avgatr = Average[40](myAtr)
34 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 8 market and timeframe combinations. The best run was Silver, 4 hours, with a profit factor of 4.53 over 458 trades.
The best run had a maximum drawdown of 5,480 USD at the tested position size, against a net result of 181,950 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.