Buys when the close breaks above the prior 20-bar high while above the 200-period average, and sells short on the mirror breakdown. Each trade has a stop 2.0 times the 20-period average true range, and an opposite signal reverses it.
Best run of 7. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:6.
| Period | Up to 2026-10-04 |
| 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-04 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | Daily | 11.38 | 772 | 2.85 | 1,624,450 USD | -185,520 |
| Nikkei 225 | Daily | n/a | 242 | 32.23 | 34,027 USD | -21,728 |
| US Crude Oil | Daily | n/a | 238 | 31.09 | 11,074 EUR | -6,952 |
| Nasdaq 100 | Daily | n/a | 236 | 30.51 | 7,525 EUR | -6,318 |
| Gold | Daily | n/a | 262 | 32.06 | 2,849 EUR | -850 |
| Gold | 4 hours | n/a | 619 | 29.56 | 1,201 EUR | -811 |
| Gold | 1 hour | n/a | 2,469 | 26.93 | 1,087 EUR | -1,008 |
Charts
The code
// ============================================================== // Trend Filtered Channel Breakout // ProRealAlgos Strategy Library | prorealalgos.com // Type: Breakout // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false entryhigh = highest[20](high)[1] entrylow = lowest[20](low)[1] exithigh = highest[20](high)[1] exitlow = lowest[20](low)[1] myAtr = Average[20](TR(close)) trendsma = Average[200](close) stopdist = myAtr * 2.0
26 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,624,450.00 USD |
| Net, long run | 1,624,450.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 7 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 11.38 over 772 trades.
The best run had a maximum drawdown of 185,520 USD at the tested position size, against a net result of 1,624,450 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.