Buys when the close crosses above the upper Bollinger Band while the 20-period midline and 200-period average both rise. Sells short when the close crosses below the lower band while both fall, and each position closes when the close crosses back through the midline.
Best run of 15. USD/JPY, Daily, spread 1, from run pf:2026-10-11-USDJPY-D.tsv:1.
| Period | Up to 2026-10-11 |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.50 | 381 | 35.96 | 1,632,810 USD | -314,350 |
| EUR/USD | Daily | 1.44 | 410 | 38.54 | 120,320 USD | -28,040 |
| USD/JPY | 1 hour | 1.13 | 4,213 | 33.16 | 824,440 USD | -158,580 |
| USD/JPY | 4 hours | n/a | 1,039 | 33.59 | 235,350 USD | -224,940 |
| Nikkei 225 | Daily | n/a | 342 | 36.84 | 35,423 USD | -9,597 |
| Silver | Daily | n/a | 367 | 29.97 | 27,555 USD | -21,196 |
| GBP/USD | Daily | n/a | 432 | 34.95 | 14,696 USD | -5,580 |
| US Crude Oil | Daily | n/a | 361 | 36.57 | 9,199 EUR | -6,333 |
| Brent Crude | Daily | n/a | 148 | 36.49 | 8,914 EUR | -6,036 |
| Nasdaq 100 | Daily | n/a | 360 | 35.00 | 6,502 EUR | -3,753 |
| DAX 40 | Daily | n/a | 455 | 35.82 | 6,262 EUR | -4,436 |
| Brent Crude | 4 hours | n/a | 509 | 33.79 | 5,130 EUR | -4,527 |
| Gold | 1 hour | n/a | 3,668 | 30.89 | 1,934 EUR | -878 |
| Gold | Daily | n/a | 385 | 36.62 | 1,849 EUR | -1,037 |
| Gold | 4 hours | n/a | 887 | 34.05 | 1,695 EUR | -1,072 |
Charts
Top 10 of 15 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Bollinger Breakout Slope Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false mid = Average[20](close) sd = STD[20](close) up = mid + 1.0 * sd dn = mid - 1.0 * sd ma = Average[200](close) bbslope = mid - mid[1] tfslope = ma - ma[1]
17 more lines: the entry and exit rules.
Setup
USD/JPY had no history beyond the standard run, so both runs used 12,000 bars.
| Bars available | 12,000 |
| Net, standard 200,000-bar run | 1,632,810.00 USD |
| Net, long run | 1,632,810.00 USD |
| Net on the older data alone | 0.00 USD |
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 15 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.50 over 381 trades.
The best run had a maximum drawdown of 314,350 USD at the tested position size, against a net result of 1,632,810 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.