A close outside the Bollinger Band (20) with volume of at least 8000 opens a trade in the breakout direction. Every position has a 30 point stop and a 60 point target, and an opposite signal flips it. Weekend bars are skipped.
Best run of 5. Gold, 30 min, spread 0.6, from run sweeps:2026-09-24-GOLD-30m-opt.tsv:4.
| Period | Up to 2026-09-24 |
| Instrument | Gold, 30 minutes |
| Spread | 0.6 points |
| Contracts | 1 |
| 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-09-24 |
| positionSize Contracts per trade | 1 |
| bandPeriod Bollinger Band length | 20 |
| minVolume Breakout bar needs at least this volume | 8000 |
| stopLossPoints Protective stop | 30 |
| takeProfitPoints Profit target | 60 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 30 min | n/a | 1,329 | 38.60 | 1,434 EUR | -607 |
| Silver | 4 hours | n/a | 1,150 | 35.48 | 12,379 USD | -4,955 |
| Gold | 4 hours | n/a | 794 | 37.15 | 1,619 EUR | -476 |
| Gold | Daily | n/a | 235 | 37.87 | 1,180 EUR | -392 |
| S&P 500 | 1 min | n/a | 265 | 40.75 | 595 EUR | -364 |
Charts
The code
// ============================================================ // Bollinger Volume Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: 30 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade bandPeriod = 20 // Bollinger Band length minVolume = 8000 // breakout bar needs at least this volume stopLossPoints = 30 // protective stop takeProfitPoints = 60 // profit target // --- Indicators --- upperBand = BollingerUp[bandPeriod](close) lowerBand = BollingerDown[bandPeriod](close) // No entries on bars that open on Saturday (6) or Sunday (0). weekendBar = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
16 more lines: the entry and exit rules.
Setup
Questions
Yes, it is fully automated with fixed point stops and targets. The code was rewritten after these sweeps and not compile-checked, so test it first.
Gold, Silver and the S&P 500. Silver 4 hours made the most at USD 12,378.5, Gold appeared on three timeframes, and S&P 500 1 minute made EUR 594.63.
At 1 contract the best Gold 30 minute run had a max drawdown of EUR 607.3. Silver 4 hours saw USD 4,954.5.
It keeps the system out of low-activity breakouts. Instruments with no real volume data will need a different threshold.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.