A long-only system that applies a trailing line to the open price and buys when a fast weighted average crosses above it. It exits on a cross below or when the close moves 5% above or below the entry price.
Best run of 13. USD/JPY, 4 hours, spread 1, from run sweeps:2026-10-10-USDJPY-4h-opt.tsv:8.
| Period | Up to 2026-10-10 |
| Instrument | USD/JPY, 4 hours |
| 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-10 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 4 hours | n/a | 1,633 | 43.66 | 430,350 USD | -255,720 |
| EUR/USD | Daily | n/a | 680 | 40.74 | 45,664 USD | -39,293 |
| Dow Jones | Daily | n/a | 734 | 41.83 | 25,915 EUR | -6,847 |
| Nikkei 225 | 4 hours | n/a | 1,196 | 42.39 | 20,109 USD | -11,128 |
| Nasdaq 100 | Daily | n/a | 649 | 44.68 | 16,842 EUR | -4,501 |
| Silver | Daily | n/a | 707 | 42.72 | 16,071 USD | -6,962 |
| DAX 40 | 4 hours | n/a | 1,425 | 44.21 | 11,582 EUR | -4,740 |
| DAX 40 | Daily | n/a | 1,050 | 40.19 | 11,035 EUR | -4,020 |
| Nasdaq 100 | 4 hours | n/a | 1,500 | 42.47 | 10,599 EUR | -4,440 |
| Brent Crude | 4 hours | n/a | 874 | 43.25 | 8,059 EUR | -3,255 |
| Gold | Daily | n/a | 778 | 39.33 | 1,854 EUR | -721 |
| Gold | 4 hours | n/a | 1,375 | 41.89 | 1,755 EUR | -1,069 |
| S&P 500 | Daily | n/a | 808 | 41.83 | 1,634 EUR | -1,175 |
Charts
Top 10 of 13 runs. The full list is in the table above.
The code
// ============================================================== // Open Price Trailing Line Long // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE ts = 0 src = open nloss = AverageTrueRange[11](close) prev = ts
23 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 13 market and timeframe combinations. The best run by trade count was USD/JPY, 4 hours, with 1,633 trades.
The best run had a maximum drawdown of 255,720 USD at the tested position size, against a net result of 430,350 USD.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.