A bar with a bigger range than any of the previous 10 bars triggers a trade in its direction, long if it closed up and short if it closed down. Every trade has a 30 point target and a 60 point stop.
Best run of 4. Gold, 10 min, spread 0.6, from run sweeps:2026-09-22-GOLD-10m-opt.tsv:3.
| Period | Up to 2026-09-22 |
| Instrument | Gold, 10 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-22 |
| positionSize Contracts per trade | 1 |
| lookbackPeriod Previous bars the current range must beat | 10 |
| stopLossPoints Protective stop in points | 60 |
| takeProfitPoints Profit target in points | 30 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| GoldBest run | 10 min | n/a | 885 | 68.70 | 1,492 EUR | -1,343 |
| USD/JPY | 2 min | n/a | 674 | 67.95 | 60,390 JPY | -57,200 |
| Silver | Daily | n/a | 758 | 68.60 | 6,029 USD | -3,000 |
| Gold | 4 hours | n/a | 668 | 68.26 | 911 EUR | -662 |
Charts
The code
Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.
// ============================================================ // High Volatility Candles // ProRealAlgos Strategy Library | prorealalgos.com // Type: Volatility // Direction: Long & short // Timeframe tested: 10 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade lookbackPeriod = 10 // previous bars the current range must beat stopLossPoints = 60 // protective stop, points takeProfitPoints = 30 // profit target, points // --- Indicators --- // Largest range of the previous lookbackPeriod bars (the current bar is excluded). biggestRange = 0 FOR i = 1 TO lookbackPeriod DO biggestRange = MAX(biggestRange, Range[i]) NEXT
17 more lines: the entry and exit rules.
Read this first
Questions
Yes. The stop and target are fixed in points and the entry is automatic, so it can run unattended.
Gold 10 minutes made 1,491.70 EUR over 885 trades. Silver Daily made 6,028.50 USD, Gold 4 hours 911.40 EUR and USD/JPY 2 minutes 60,390 JPY.
Each loss is capped at 60 points. At 1 contract with a 0.6 point spread, Gold 10 minutes had a max drawdown of 1,343.20 EUR.
Wide bars on 10 minute Gold often carry into the next few bars, which is what a 30 point target tries to catch.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.