In an uptrend above SMA(200), buys when close breaks below the prior 7-bar low, and in a downtrend sells short when close breaks above the prior 7-bar high. Exits break the opposite 7-bar level.
Best run of 8. USD/JPY, Daily, spread 1, from run pf:2026-10-13-USDJPY-D.tsv:8.
| 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 | 8.83 | 933 | 4.61 | 1,652,860 USD | -108,020 |
| Nikkei 225 | Daily | n/a | 466 | 52.58 | 21,092 USD | -13,051 |
| Dow Jones | Daily | n/a | 520 | 56.54 | 15,400 EUR | -5,206 |
| Dow Jones | 4 hours | n/a | 362 | 47.51 | 5,582 EUR | -5,074 |
| Nasdaq 100 | Daily | n/a | 471 | 49.47 | 5,545 EUR | -4,663 |
| FTSE 100 | Daily | n/a | 461 | 52.71 | 3,972 EUR | -3,399 |
| S&P 500 | Daily | n/a | 577 | 55.11 | 3,059 EUR | -986 |
| S&P 500 | 4 hours | n/a | 1,152 | 47.66 | 1,041 EUR | -712 |
Charts
The code
// ============================================================== // Channel Break With SMA Trend // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false hi = highest[7](high) lo = lowest[7](low) ma = Average[200](close) myTr = TR(close) myAtr = Average[10](myTr) dist = 2 * myAtr
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 8 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 8.83 over 933 trades.
The best run had a maximum drawdown of 108,020 USD at the tested position size, against a net result of 1,652,860 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.