The strategy buys on the first bar where the latest 30 bar high is newer than the latest 30 bar low, close is above the 200 period EMA, and the 20 bar range exceeds 0.8 times ATR(20). It exits when the structure turns down.
Best run of 30. Gold, Daily, spread 0.6, from run pf:2026-10-04-GOLD-D.tsv:1.
| Period | Up to 2026-10-04 |
| Instrument | Gold, Daily |
| Spread | 0.6 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 |
|---|---|---|---|---|---|---|
| GoldBest run | Daily | 3.09 | 126 | 44.44 | 3,656 EUR | -809 |
| S&P 500 | Daily | 2.21 | 153 | 41.83 | 3,966 EUR | -962 |
| Nikkei 225 | 4 hours | 1.55 | 256 | 40.62 | 31,069 USD | -7,362 |
| USD/JPY | 4 hours | n/a | 586 | 1.71 | 90,430 USD | -63,960 |
| Nikkei 225 | Daily | n/a | 101 | 44.55 | 38,402 USD | -13,871 |
| Nikkei 225 | 1 hour | n/a | 934 | 39.61 | 25,487 USD | -11,232 |
| Nikkei 225 | 30 min | n/a | 1,871 | 39.55 | 23,020 USD | -11,727 |
| Dow Jones | Daily | n/a | 151 | 43.71 | 18,913 EUR | -5,864 |
| Nasdaq 100 | Daily | n/a | 109 | 53.21 | 17,410 EUR | -4,480 |
| Nikkei 225 | 3 min | n/a | 1,902 | 35.75 | 13,492 USD | -8,351 |
| Nasdaq 100 | 4 hours | n/a | 323 | 45.51 | 12,851 EUR | -4,661 |
| Dow Jones | 1 hour | n/a | 372 | 38.98 | 12,765 EUR | -5,154 |
| Nasdaq 100 | 1 hour | n/a | 1,175 | 40.09 | 10,913 EUR | -3,471 |
| Dow Jones | 4 hours | n/a | 106 | 42.45 | 10,868 EUR | -7,198 |
| Nasdaq 100 | 15 min | n/a | 1,989 | 38.01 | 10,402 EUR | -3,430 |
| DAX 40 | 30 min | n/a | 2,135 | 38.41 | 9,197 EUR | -3,211 |
| DAX 40 | Daily | n/a | 148 | 43.24 | 8,988 EUR | -4,063 |
| DAX 40 | 1 hour | n/a | 1,089 | 40.77 | 8,361 EUR | -3,406 |
| Nasdaq 100 | 30 min | n/a | 2,307 | 41.09 | 7,753 EUR | -3,825 |
| Nasdaq 100 | 10 min | n/a | 1,939 | 36.31 | 7,312 EUR | -3,520 |
| Nasdaq 100 | 5 min | n/a | 1,904 | 35.29 | 3,887 EUR | -3,430 |
| DAX 40 | 4 hours | n/a | 327 | 40.67 | 3,764 EUR | -3,510 |
| Gold | 4 hours | n/a | 281 | 41.64 | 2,948 EUR | -900 |
| Gold | 1 hour | n/a | 1,055 | 40.95 | 2,632 EUR | -869 |
| Gold | 30 min | n/a | 1,924 | 38.88 | 2,519 EUR | -701 |
| S&P 500 | 4 hours | n/a | 342 | 44.15 | 1,611 EUR | -1,058 |
| S&P 500 | 1 hour | n/a | 1,187 | 40.94 | 1,333 EUR | -1,020 |
| Gold | 15 min | n/a | 1,935 | 33.59 | 1,147 EUR | -562 |
| Gold | 10 min | n/a | 1,957 | 34.18 | 1,115 EUR | -612 |
| Gold | 5 min | n/a | 1,970 | 35.28 | 616 EUR | -548 |
Charts
Top 10 of 30 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Swing Structure Trend Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long only // Timeframe tested: Daily // ============================================================== DEFPARAM CumulateOrders = false ONCE phl = 0 ONCE pll = 0 swing = 30
34 more lines: the entry and exit rules.
Setup
Nikkei 225 had no history beyond the standard run, so both runs used 22,000 bars.
| Bars available | 22,000 |
| Net, standard 200,000-bar run | 31,069.20 USD |
| Net, long run | 31,452.90 USD |
| Net on the older data alone | 383.70 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 30 market and timeframe combinations. The best run was Gold, Daily, with a profit factor of 3.09 over 126 trades.
The best run had a maximum drawdown of 809 EUR at the tested position size, against a net result of 3,656 EUR.
It only takes long trades.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.