A Supertrend on the median price uses a tighter band when ADX is above 25 and a wider band when ADX is below 20. It buys on up flips and sells short on down flips, and ignores flips while ADX is below 20.
Best run of 2. Brent Crude, 4 hours, spread 3, from run sweeps:2026-10-03-BRENT-4h-opt.tsv:6.
| Period | Up to 2026-10-03 |
| Instrument | Brent Crude, 4 hours |
| Spread | 3 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-03 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| Brent CrudeBest run | 4 hours | n/a | 503 | 45.73 | 9,589 EUR | -6,753 |
| Brent Crude | Daily | n/a | 149 | 47.65 | 17,671 EUR | -8,146 |
Charts
The code
// ============================================================== // ADX Regime Supertrend Reversal // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 4 hours // ============================================================== DEFPARAM CumulateOrders = false ONCE regime = 0 ONCE mult = 1.75 ONCE lb = 0 ONCE ub = 0 ONCE dir = 1 tightmult = 1.75 widemult = 4.5 myAdx = ADX[14] istrend = 0 ischop = 0
62 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 2 market and timeframe combinations. The best run by trade count was Brent Crude, 4 hours, with 503 trades.
The best run had a maximum drawdown of 6,753 EUR at the tested position size, against a net result of 9,589 EUR.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.