A close below a lower band (35 EMA minus 2 times a 5-bar standard deviation) with RSI(11) under 30 triggers a long. A close above the upper band with RSI(5) over 70 triggers a short. Exits use ATR(49) based stop and target, and an opposite signal flips the trade.
Best run of 10. EUR/USD, 15 min, spread 1, from run sweeps:2026-09-17-EURUSD-15m-opt.tsv:2.
| Period | Up to 2026-09-17 |
| Instrument | EUR/USD, 15 minutes |
| Spread | 1 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-17 |
| positionSize Contracts per trade | 1 |
| bandPeriod EMA at the centre of the bands | 35 |
| lowerStdPeriod Standard deviation length for the lower band | 5 |
| upperStdPeriod Standard deviation length for the upper band | 10 |
| bandWidth Band distance in standard deviations | 2 |
| longRsiPeriod RSI length for the long filter | 11 |
| shortRsiPeriod RSI length for the short filter | 5 |
| oversoldLevel Long RSI must be below this | 30 |
| overboughtLevel Short RSI must be above this | 70 |
| atrPeriod ATR length for stop and target | 49 |
| stopAtrFactor Stop in points = ATR x this factor | 300000 |
| targetAtrFactor Target in points = ATR x this factor | 80000 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 15 min | n/a | 3,180 | 66.04 | 43,255 USD | -28,127 |
| Silver | 1 hour | n/a | 1,850 | 61.68 | 1,065,453 USD | -568,760 |
| USD/JPY | 4 hours | n/a | 616 | 66.23 | 414,820 JPY | -385,010 |
| EUR/USD | 10 min | n/a | 3,090 | 65.24 | 31,979 USD | -13,972 |
| Dow Jones | Daily | n/a | 228 | 66.67 | 13,331 EUR | -12,096 |
| GBP/USD | 4 hours | n/a | 781 | 64.02 | 9,440 USD | -4,297 |
| Nasdaq 100 | 4 hours | n/a | 583 | 65.35 | 7,269 EUR | -6,960 |
| FTSE 100 | Daily | n/a | 186 | 68.28 | 6,421 EUR | -4,934 |
| Dow Jones | 1 min | n/a | 2,899 | 66.13 | 4,930 EUR | -3,617 |
| S&P 500 | 4 hours | n/a | 565 | 66.37 | 1,916 EUR | -1,403 |
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.
// ============================================================ // Volatility Band RSI Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long & short // Timeframe tested: 15 minutes // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade bandPeriod = 35 // EMA at the centre of the bands lowerStdPeriod = 5 // standard deviation length for the lower band upperStdPeriod = 10 // standard deviation length for the upper band bandWidth = 2 // band distance in standard deviations longRsiPeriod = 11 // RSI length for the long filter shortRsiPeriod = 5 // RSI length for the short filter oversoldLevel = 30 // long RSI must be below this overboughtLevel = 70 // short RSI must be above this atrPeriod = 49 // ATR length for stop and target stopAtrFactor = 300000 // stop in points = ATR x this factor targetAtrFactor = 80000 // target in points = ATR x this factor // --- Indicators --- // Holiday calendar: no trading on 23 and 24 June and on 9 November. IF (Month = 6 AND (Day = 23 OR Day = 24)) OR (Month = 11 AND Day = 9) THEN tradingDay = 0 ELSE tradingDay = 1 ENDIF // Bands are only updated on trading days, as in the original, so [1] after a holiday // still points at the last value computed. IF tradingDay = 1 THEN lowerBand = ExponentialAverage[bandPeriod](close) - bandWidth * STD[lowerStdPeriod](close) upperBand = ExponentialAverage[bandPeriod](close) + bandWidth * STD[upperStdPeriod](close) ENDIF longRsi = RSI[longRsiPeriod](close) shortRsi = RSI[shortRsiPeriod](close) atrValue = AverageTrueRange[atrPeriod](close)
19 more lines: the entry and exit rules.
Read this first
Questions
Yes, it uses standard indicators and ATR based stops. The rewritten code has not been compile-checked, so test it on demo.
EUR/USD 15 minutes made USD 43,255.0 and 10 minutes USD 31,979.0. Dow Jones Daily made EUR 13,331.2, but S&P 500 4 hours only EUR 1,916.2.
With 1 contract the best run had a max drawdown of USD 28,127.0. Size your account for at least that, since the backtest excludes commissions and financing.
The bands and RSI need enough bars to stretch and snap back within a session. On 15 minutes EUR/USD produced 3,180 trades, a large enough sample to read the result.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.