Buys when a Supertrend flips to uptrend while the close is above the 50-period average, and sells short on a downtrend flip with the close below it. Stops are 1.5 times ATR(14) and targets 1.5 times the stop distance.
Best run of 14. Silver, 4 hours, spread 2, from run pf:2026-10-04-SILVER-4h.tsv:5.
| Period | Up to 2026-10-04 |
| Instrument | Silver, 4 hours |
| Spread | 2 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 |
|---|---|---|---|---|---|---|
| SilverBest run | 4 hours | 3.23 | 637 | 38.30 | 176,799 USD | -12,812 |
| Gold | 4 hours | 1.30 | 637 | 41.60 | 1,410 EUR | -336 |
| Nikkei 225 | Daily | n/a | 272 | 44.85 | 21,997 USD | -6,144 |
| Dow Jones | 4 hours | n/a | 213 | 46.01 | 13,879 EUR | -4,247 |
| Dow Jones | Daily | n/a | 304 | 43.42 | 10,087 EUR | -4,235 |
| US Crude Oil | 1 hour | n/a | 1,832 | 40.99 | 6,715 EUR | -1,942 |
| US Crude Oil | Daily | n/a | 227 | 44.49 | 6,400 EUR | -2,543 |
| Nasdaq 100 | 4 hours | n/a | 757 | 38.71 | 5,655 EUR | -3,160 |
| Brent Crude | 1 hour | n/a | 1,349 | 41.14 | 5,138 EUR | -2,091 |
| Brent Crude | Daily | n/a | 103 | 47.57 | 5,109 EUR | -3,033 |
| US Crude Oil | 4 hours | n/a | 520 | 41.92 | 4,402 EUR | -2,429 |
| Brent Crude | 4 hours | n/a | 401 | 43.64 | 4,032 EUR | -4,019 |
| S&P 500 | 4 hours | n/a | 718 | 40.25 | 1,835 EUR | -833 |
| Gold | Daily | n/a | 284 | 41.55 | 679 EUR | -389 |
Charts
Top 10 of 14 runs. The full list is in the table above.
Above 1.0 made money, below 1.0 lost money.
The code
// ============================================================== // Supertrend Midline Filter // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE fub = 0 ONCE flb = 0 ONCE dir = 1 myAtr = AverageTrueRange[10](close) ub = MedianPrice + 3.0 * myAtr lb = MedianPrice - 3.0 * myAtr
50 more lines: the entry and exit rules.
Setup
Gold had no history beyond the standard run, so both runs used 30,000 bars.
| Bars available | 30,000 |
| Net, standard 200,000-bar run | 1,410.10 EUR |
| Net, long run | 1,410.10 EUR |
| Net on the older data alone | 0.00 EUR |
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 14 market and timeframe combinations. The best run was Silver, 4 hours, with a profit factor of 3.23 over 637 trades.
The best run had a maximum drawdown of 12,812 USD at the tested position size, against a net result of 176,798 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.