This idea follows a range filter line that moves with the close, buying or selling when the close moves past it after a change in direction. Entries also need volume, RSI, EMA and volatility conditions, and each trade has a fixed stop and target.
Best run of 8. USD/JPY, Daily, spread 1, from run pf:2026-10-12-USDJPY-D.tsv:69.
| 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 | 2.54 | 134 | 37.31 | 24,190 USD | -2,150 |
| Silver | 4 hours | n/a | 139 | 24.46 | 15,412 USD | -4,278 |
| Dow Jones | Daily | n/a | 191 | 23.04 | 12,573 EUR | -5,030 |
| Dow Jones | 4 hours | n/a | 58 | 27.59 | 5,920 EUR | -4,300 |
| DAX 40 | 1 hour | n/a | 975 | 22.36 | 5,370 EUR | -1,963 |
| US Crude Oil | 30 min | n/a | 1,411 | 23.88 | 5,104 EUR | -2,899 |
| Brent Crude | 4 hours | n/a | 133 | 27.82 | 4,453 EUR | -3,332 |
| Gold | 4 hours | n/a | 119 | 21.01 | 524 EUR | -511 |
Charts
The code
// ============================================================== // Range Filter Trend With ATR Brackets // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE filt = 0 ONCE upward = 0 ONCE downward = 0 ONCE condini = 0 chg = ABS(close - close[1]) avrng = ExponentialAverage[100](chg) smrng = ExponentialAverage[199](avrng) * 3 prevfilt = filt
67 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 2.54 over 134 trades.
The best run had a maximum drawdown of 2,150 USD at the tested position size, against a net result of 24,190 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.