Buys when the close moves more than 2 times the 20-period ATR above the 20-period EMA, which is treated as the start of a new uptrend. It sells once the close falls back below the 20-period EMA.
Best run of 3. Gold, Daily, spread 0.6, from run pf:2026-10-11-GOLD-D.tsv:6.
| Period | Up to 2026-10-11 |
| Instrument | Gold, Daily |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | Daily | 1.59 | 194 | 38.66 | 15,468 EUR | -7,292 |
| USD/JPY | Daily | 3.01 | 14 | 35.71 | 1,936 USD | -1,127 |
| Brent Crude | Daily | 1.50 | 73 | 45.21 | 7,802 EUR | -5,865 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Volatility Band Upside Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE capital = 10000
20 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 was Gold, Daily, with a profit factor of 1.59 over 194 trades.
The best run had a maximum drawdown of 7,292 EUR at the tested position size, against a net result of 15,468 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.