Buys when the close moves above an EMA(30) band set 0.2 times the true range EMA, and sells short below the lower band. Each trade has a stop at 4 times the 14-period ATR and a target at twice that distance.
Best run of 7. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:66.
| Period | Up to 2026-10-13 |
| 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-13 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 1.39 | 976 | 40.27 | 104,650 USD | -10,430 |
| Silver | 4 hours | n/a | 2,145 | 24.15 | 32,393 USD | -25,510 |
| Nikkei 225 | Daily | n/a | 843 | 27.40 | 28,115 USD | -14,085 |
| Dow Jones | 4 hours | n/a | 695 | 28.20 | 10,550 EUR | -9,451 |
| Nasdaq 100 | 4 hours | n/a | 2,172 | 25.05 | 10,069 EUR | -7,471 |
| US Crude Oil | 4 hours | n/a | 1,559 | 28.22 | 7,207 EUR | -5,441 |
| Gold | Daily | n/a | 985 | 25.58 | 1,001 EUR | -818 |
Charts
The code
// ============================================================== // Keltner Band Breakout With ATR Bracket // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE inlong = 0 ONCE inshort = 0 base = ExponentialAverage[30](close) rangema = ExponentialAverage[30](TR(close)) upperk = base + rangema * 0.2 lowerk = base - rangema * 0.2 myAtr = AverageTrueRange[14](close) sldist = myAtr * 4 tpdist = sldist * 2
20 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.39 over 976 trades.
The best run had a maximum drawdown of 10,430 USD at the tested position size, against a net result of 104,650 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.