The strategy trades moves out of a squeeze, when Bollinger Bands expand beyond the Keltner Channel, in the direction of a momentum reading and the 200-bar SMA. It exits when momentum stops rising or falling, and it uses a 2 times ATR(14) stop.
Best run of 4. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:22.
| 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 | 8.53 | 193 | 4.66 | 274,600 USD | -59,540 |
| Gold | 4 hours | 1.53 | 507 | 42.21 | 1,347 EUR | -269 |
| Nikkei 225 | 4 hours | n/a | 370 | 44.32 | 16,871 USD | -5,599 |
| US Crude Oil | 4 hours | n/a | 340 | 40.00 | 2,588 EUR | -1,543 |
Charts
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Squeeze Momentum SMA Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Volatility // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE cnt = 0 basis = Average[20](close) dev = 1.5 * STD[20](close) upperbb = basis + dev lowerbb = basis - dev rangema = Average[20](TR(close)) upperkc = basis + rangema * 1.5 lowerkc = basis - rangema * 1.5
43 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 4 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 8.53 over 193 trades.
The best run had a maximum drawdown of 59,540 USD at the tested position size, against a net result of 274,600 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.