Join waitlist
Strategies / Trend / Supertrend Direction Flip Long

Supertrend Direction Flip Long

Buys when the Supertrend flips from down to up and sells when it flips back down, using 7-period average true range bands set 3 times the range from the bar's midpoint. Only long trades are taken.

TrendLong onlySwingNasdaq 100Daily
2.25Profit factor
18,348Net profit EUR
45.74%Win rate
188Trades
-3,031Max drawdown
97.59Avg trade

Best run of 25. Nasdaq 100, Daily, spread 3, from run pf:2026-10-05-NAS100-D.tsv:16.

Entry rules, long

  1. The upper and lower bands are the bar midpoint plus or minus 3 times the 7-period average of true range

Exit rules

  1. The trend changes from up to down, which happens when the close falls below the previous lower band

Test conditions

PeriodUp to 2026-10-05
InstrumentNasdaq 100, Daily
Spread3 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-05

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.25 18845.7418,348 EUR-3,031
S&P 500Daily2.11 23142.863,946 EUR-491
Dow JonesDaily1.93 20046.0027,936 EUR-5,934
Gold4 hours1.70 42943.123,328 EUR-749
Gold1 hour1.22 1,73139.572,596 EUR-588
USD/JPY1 hourn/a 1,87439.59375,670 USD-288,660
USD/JPY30 minn/a 2,69338.14290,850 USD-181,450
EUR/USD4 hoursn/a 62637.3839,550 USD-36,906
Nikkei 225Dailyn/a 20740.5833,463 USD-14,047
Silver4 hoursn/a 42040.2426,800 USD-15,414
Nikkei 2254 hoursn/a 38441.6726,159 USD-9,205
Nasdaq 10030 minn/a 3,26338.7112,903 EUR-3,717
DAX 401 hourn/a 1,85740.7111,563 EUR-4,563
DAX 4030 minn/a 3,19837.6211,310 EUR-3,156
Nasdaq 1004 hoursn/a 52341.4911,086 EUR-3,167
DAX 40Dailyn/a 38440.369,797 EUR-5,124
Dow Jones1 hourn/a 69840.839,678 EUR-8,032
Brent CrudeDailyn/a 7950.639,549 EUR-9,071
Nasdaq 1001 hourn/a 2,22139.898,700 EUR-3,378
Dow Jones4 hoursn/a 16241.367,842 EUR-5,889
DAX 404 hoursn/a 46540.657,099 EUR-4,040
Nasdaq 1005 minn/a 2,76436.584,035 EUR-3,564
Gold30 minn/a 2,79437.622,532 EUR-995
S&P 5004 hoursn/a 50644.072,179 EUR-700
GoldDailyn/a 21142.182,093 EUR-1,131

Charts

Results by run

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

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// Supertrend Direction Flip Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE up = 0
ONCE lo = 0
ONCE trend = 1

myAtr = Average[7](TR(close))
mid = (high + low) / 2
rawup = mid + 3 * myAtr
rawlo = mid - 3 * myAtr
prevtrend = trend
prevup = up
prevlo = lo

29 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

SuperTrendTrue RangeSMA
Longer historyRe-run on up to 1,000,000 barsNasdaq 100 · Daily · older data 307.20 EUR

Nasdaq 100 had no history beyond the standard run, so both runs used 10,000 bars.

Nasdaq 100 · Daily

Bars available10,000
Net, standard 200,000-bar run18,347.60 EUR
Net, long run18,654.80 EUR
Net on the older data alone307.20 EUR
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 Direction Flip Long 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 25 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.25 over 188 trades.

How large was the drawdown?

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

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

MACD Zero Cross and EMA Stack

Also a trend strategy.

2.25 PF · 187 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

Copy trading on US indices is available to ProRealAlgos members as spots open.

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