Join waitlist
Strategies / Trend / SuperTrend Flip Reversal

SuperTrend Flip Reversal

The strategy buys when a SuperTrend band built from 3.0 times ATR(10) flips to an uptrend and sells short when it flips to a downtrend. Each flip reverses the open position.

TrendLong & shortSwingGold4 hours
1.39Profit factor
3,958Net profit EUR
40.19%Win rate
826Trades
-938Max drawdown
4.79Avg trade

Best run of 13. Gold, 4 hours, spread 0.6, from run pf:2026-10-04-GOLD-4h.tsv:8.

Entry rules, long

Entry rules, short

Exit rules

  1. An opposite flip closes the trade and reverses it.

Test conditions

PeriodUp to 2026-10-04
InstrumentGold, 4 hours
Spread0.6 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
GoldBest run4 hours1.39 82640.193,958 EUR-938
USD/JPYDailyn/a 40137.911,470,150 USD-582,140
USD/JPY1 hourn/a 3,38237.20453,750 USD-322,870
EUR/USDDailyn/a 36239.50116,546 USD-42,679
Brent CrudeDailyn/a 15341.8321,238 EUR-6,655
Dow Jones4 hoursn/a 29239.3818,327 EUR-11,871
DAX 4030 minn/a 5,42136.5114,564 EUR-6,216
Nasdaq 100Dailyn/a 36534.7912,861 EUR-5,381
US Crude OilDailyn/a 35041.4312,563 EUR-7,703
Brent Crude1 hourn/a 1,78538.546,180 EUR-5,638
Gold30 minn/a 4,89535.512,156 EUR-1,988
GoldDailyn/a 39239.291,819 EUR-1,282
Gold1 hourn/a 2,94236.911,587 EUR-884

Charts

Results by run

Top 10 of 13 runs. The full list is in the table above.

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// SuperTrend Flip Reversal
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE lower = 0
ONCE upper = 0
ONCE super = 0
ONCE dir = 1

myAtr = AverageTrueRange[10](close)
mid = (high + low) / 2
newup = mid + 3.0 * myAtr
newlow = mid - 3.0 * myAtr
prevdir = dir

IF BarIndex = 10 THEN
    lower = newlow
    upper = newup
    dir = 1
    super = newup

40 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

SuperTrendATR
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run SuperTrend Flip Reversal in ProOrder?

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.

Which markets was it tested on?

It was tested on 13 market and timeframe combinations. The best run was Gold, 4 hours, with a profit factor of 1.39 over 826 trades.

How large was the drawdown?

The best run had a maximum drawdown of 938 EUR at the tested position size, against a net result of 3,958 EUR.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

KDJ J Line Momentum Long

Uses the same indicator.

4.17 PF · 6,135 trades

CCI Breakout

Best run on the same market, Gold.

1.08 PF · 6,065 trades

Dual MA Long Trend

Also a trend strategy.

1.39 PF · 241 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs