Trades each Supertrend flip (ATR 10, factor 3, median price). It buys when the trend flips up and sells short when it flips down, so each flip reverses the position, with no stop or target.
Best run of 13. Gold, 4 hours, spread 0.6, from run pf:2026-10-04-GOLD-4h.tsv:1.
| Period | Up to 2026-10-04 |
| Instrument | Gold, 4 hours |
| 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 | 4 hours | 1.39 | 825 | 40.12 | 3,913 EUR | -938 |
| USD/JPY | Daily | n/a | 401 | 37.91 | 1,470,150 USD | -582,140 |
| USD/JPY | 1 hour | n/a | 3,383 | 37.19 | 449,250 USD | -322,870 |
| EUR/USD | Daily | n/a | 361 | 39.34 | 112,990 USD | -42,679 |
| Brent Crude | Daily | n/a | 152 | 41.45 | 20,903 EUR | -6,655 |
| Dow Jones | 4 hours | n/a | 292 | 39.38 | 18,327 EUR | -11,871 |
| DAX 40 | 30 min | n/a | 5,421 | 36.51 | 14,564 EUR | -6,216 |
| Nasdaq 100 | Daily | n/a | 364 | 34.62 | 12,855 EUR | -5,381 |
| US Crude Oil | Daily | n/a | 350 | 41.43 | 12,624 EUR | -7,703 |
| Brent Crude | 1 hour | n/a | 1,785 | 38.54 | 6,180 EUR | -5,638 |
| Gold | 30 min | n/a | 4,895 | 35.53 | 2,212 EUR | -1,988 |
| Gold | Daily | n/a | 391 | 39.39 | 1,829 EUR | -1,282 |
| Gold | 1 hour | n/a | 2,943 | 36.87 | 1,463 EUR | -884 |
Charts
Top 10 of 13 runs. The full list is in the table above.
The code
// ============================================================== // Supertrend Flip Reversal System // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE up = 0 ONCE dn = 0 ONCE trend = 1 src = MedianPrice myAtr = AverageTrueRange[10](close) basicup = src - 3.0 * myAtr basicdn = src + 3.0 * myAtr
39 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 was Gold, 4 hours, with a profit factor of 1.39 over 825 trades.
The best run had a maximum drawdown of 938 EUR at the tested position size, against a net result of 3,913 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.