The system buys when the close is above the inner upper band around a 100-period SMA and the outer upper band is rising, and sells short on the mirror setup. Longs exit when price falls back below the outer band or crosses the average.
Best run of 7. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:19.
| Period | Up to 2026-10-12 |
| Instrument | USD/JPY, Daily |
| Spread | 1 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-12 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.47 | 531 | 35.97 | 2,541,770 USD | -410,800 |
| EUR/USD | Daily | 1.32 | 546 | 34.80 | 133,591 USD | -32,409 |
| EUR/USD | 2 min | n/a | 9,598 | 20.96 | 214,750 USD | -164,665 |
| Nikkei 225 | Daily | n/a | 451 | 32.82 | 26,578 USD | -24,269 |
| Nasdaq 100 | Daily | n/a | 496 | 36.29 | 10,675 EUR | -5,529 |
| Gold | Daily | n/a | 611 | 34.70 | 2,276 EUR | -1,131 |
| S&P 500 | Daily | n/a | 664 | 33.43 | 1,302 EUR | -1,277 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Nested Bollinger Band Trend Entry // ProRealAlgos Strategy Library | prorealalgos.com // Type: Volatility // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ma = Average[100](close) sd = STD[100](ma) inu = ma + sd * 0.25 inb = ma - sd * 0.25 outu = ma + sd * 1.5 outb = ma - sd * 1.5
19 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 7 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.47 over 531 trades.
The best run had a maximum drawdown of 410,800 USD at the tested position size, against a net result of 2,541,770 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.