A supertrend system whose band multiplier scales with the width of a 100-bar average plus or minus one standard deviation. It holds a long while the trend is up and a short while down, and it flips on each trend change.
Best run of 11. USD/JPY, 15 min, spread 1, from run sweeps:2026-10-11-USDJPY-15m-opt.tsv:19.
| Period | Up to 2026-10-11 |
| Instrument | USD/JPY, 15 minutes |
| 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-11 |
Every run
| Market | Timeframe | PF | Trades | Win % | Net | Max DD |
|---|---|---|---|---|---|---|
| USD/JPYBest run | 15 min | n/a | 2,305 | 36.27 | 278,200 USD | -208,620 |
| USD/JPY | Daily | n/a | 167 | 44.31 | 2,539,230 USD | -662,300 |
| USD/JPY | 4 hours | n/a | 402 | 37.06 | 1,055,790 USD | -400,300 |
| EUR/USD | Daily | n/a | 145 | 46.90 | 138,074 USD | -43,751 |
| GBP/USD | Daily | n/a | 165 | 41.21 | 19,490 USD | -6,347 |
| Brent Crude | Daily | n/a | 64 | 39.06 | 8,681 EUR | -6,410 |
| Nasdaq 100 | Daily | n/a | 128 | 41.41 | 6,417 EUR | -5,835 |
| Gold | 1 hour | n/a | 1,401 | 38.76 | 2,438 EUR | -1,254 |
| Gold | 15 min | n/a | 2,300 | 34.61 | 2,061 EUR | -1,137 |
| Gold | Daily | n/a | 154 | 38.96 | 2,043 EUR | -1,305 |
| S&P 500 | Daily | n/a | 169 | 34.91 | 1,715 EUR | -1,250 |
Charts
Top 10 of 11 runs. The full list is in the table above.
The code
// ============================================================== // Adaptive Supertrend Flip Trading // ProRealAlgos Strategy Library | prorealalgos.com // Type: Trend // Direction: Long & short // Timeframe tested: 15 minutes // ============================================================== DEFPARAM CumulateOrders = false ONCE prevup = 0 ONCE prevlo = 0 ONCE trend = 1 ONCE init = 0 vma = Average[100](close) vsd = STD[100](close) width = (vma + vsd) - (vma - vsd) mult = 5 + 5 * (width / vma) myAtr = AverageTrueRange[10](close) up = TypicalPrice - (mult * myAtr) lo = TypicalPrice + (mult * myAtr) prevtrend = trend
37 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 11 market and timeframe combinations. The best run by trade count was USD/JPY, 15 minutes, with 2,305 trades.
The best run had a maximum drawdown of 208,620 USD at the tested position size, against a net result of 278,200 USD.
It trades both long and short.
Related
The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.