After a bar dips below the lower Bollinger Band (20, 1.5), this system waits for a bar that closes back inside the bands and above the previous high. It also needs TEMA(21) above TEMA(50) and price crossing above the session VWAP. It exits at the upper band or when TEMA(21) crosses below TEMA(50).
Best run of 22. EUR/USD, 1 hour, spread 1, from run sweeps:2026-09-26-EURUSD-1h-opt.tsv:3.
| Period | Up to 2026-09-26 |
| Instrument | EUR/USD, 1 hour |
| 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-26 |
| positionSize Contracts per trade | 1 |
| bandPeriod Bollinger Band length | 20 |
| bandWidth Bollinger Band width in standard deviations | 1.5 |
| fastPeriod Fast TEMA length | 21 |
| slowPeriod Slow TEMA length | 50 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| EUR/USDBest run | 1 hour | n/a | 326 | 63.80 | 14,600 USD | -4,252 |
| USD/JPY | 1 hour | n/a | 187 | 63.10 | 126,850 JPY | -39,590 |
| USD/JPY | 15 min | n/a | 277 | 61.73 | 33,330 JPY | -24,320 |
| USD/JPY | 5 min | n/a | 87 | 60.92 | 13,760 JPY | -9,540 |
| EUR/USD | 4 hours | n/a | 63 | 60.32 | 10,264 USD | -2,824 |
| Silver | Daily | n/a | 11 | 63.64 | 5,608 USD | -2,173 |
| Silver | 4 hours | n/a | 39 | 69.23 | 4,676 USD | -1,424 |
| Brent Crude | 30 min | n/a | 291 | 67.70 | 3,909 EUR | -1,069 |
| Silver | 1 hour | n/a | 179 | 64.80 | 3,510 USD | -2,211 |
| Nikkei 225 | 1 hour | n/a | 100 | 63.00 | 1,871 USD | -1,760 |
| US Crude Oil | 1 hour | n/a | 171 | 63.16 | 1,757 EUR | -842 |
| Brent Crude | 1 hour | n/a | 114 | 53.51 | 1,695 EUR | -1,079 |
| DAX 40 | 4 hours | n/a | 27 | 62.96 | 1,539 EUR | -675 |
| Silver | 3 min | n/a | 82 | 54.88 | 1,161 USD | -565 |
| Nasdaq 100 | 15 min | n/a | 291 | 64.60 | 997 EUR | -795 |
| Nikkei 225 | 3 min | n/a | 47 | 61.70 | 949 USD | -743 |
| Brent Crude | Daily | n/a | 4 | 75.00 | 703 EUR | -701 |
| Nikkei 225 | 1 min | n/a | 22 | 59.09 | 564 USD | -284 |
| Gold | 15 min | n/a | 260 | 66.54 | 187 EUR | -60.30 |
| Gold | 5 min | n/a | 108 | 66.67 | 118 EUR | -70.90 |
| Gold | 3 min | n/a | 69 | 66.67 | 92.10 EUR | -23.80 |
| Gold | 2 min | n/a | 48 | 70.83 | 43.40 EUR | -37.90 |
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.
// ============================================================ // Reversal Catcher // ProRealAlgos Strategy Library | prorealalgos.com // Type: Mean reversion // Direction: Long only // Timeframe tested: 1 hour // ============================================================ // --- Settings --- DEFPARAM CumulateOrders = false // --- Parameters --- positionSize = 1 // contracts per trade bandPeriod = 20 // Bollinger length bandWidth = 1.5 // Bollinger width in standard deviations fastPeriod = 21 // fast TEMA slowPeriod = 50 // slow TEMA // State, seeded so every value is defined on the first bar. ONCE inTrade = 0 ONCE barsToday = 0 ONCE vwapValue = 0 // --- Indicators --- midBand = Average[bandPeriod](close) stdDevValue = SQRT(Summation[bandPeriod]((close - midBand) * (close - midBand)) / bandPeriod) upperBand = midBand + (stdDevValue * bandWidth) lowerBand = midBand - (stdDevValue * bandWidth) fastMA = TEMA[fastPeriod](close) slowMA = TEMA[slowPeriod](close) // Session VWAP, reset on a new day. IF Day <> Day[1] THEN barsToday = 1 vwapValue = TypicalPrice ELSE barsToday = barsToday + 1 IF volume > 0 THEN vwapValue = Summation[barsToday](volume * TypicalPrice) / Summation[barsToday](volume) ENDIF ENDIF
23 more lines: the entry and exit rules.
Read this first
Questions
It can, but note the stop is so wide it rarely fires. The rewritten code was not compile-checked, so run it in ProBacktest before going live.
Every run listed was positive. USD/JPY 1 hour made JPY 126,850, and the best recorded run, EUR/USD 1 hour, made USD 14,600 over 326 trades with a 63.8% win rate.
The EUR/USD 1 hour run had a max drawdown of USD 4,252. On USD/JPY 1 hour the drawdown reached JPY 39,590.
Both the best recorded run and the largest profit came from 1 hour charts, where the band and TEMA filters produce fewer, cleaner signals.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.