The short version. This is a TradingView SuperTrend strategy backtest: the SuperTrend STRATEGY script by KivancOzbilgic, one of the most-boosted open-source strategies on TradingView (25,185 boosts), ported line for line to Python and run on 6.7 years of real Exness ticks with real spreads and commission.

  • Gold H4: profit factor 1.97 on 267 trades, Jan 2020 to Sep 2026. But 97% of that profit came from the 2024–2026 gold rally. From 2020 to 2023 it made a profit factor of 1.05.
  • NZDUSD: M15, H1 and H4 all lost, with profit factors between 0.80 and 0.86. I tried 32 parameter combinations on H1 and H4 and none of them got above 1.0.
  • Swap isn't included. The strategy is always in a trade, so every figure here is the best case, not the final number.

My verdict: it's a clean, honest trend filter. It isn't a trading system you can switch on and leave.

This is the first post in a series. I'm taking the most-boosted open-source strategies on TradingView, porting them exactly, and running them on broker tick data with real costs.

Is the TradingView backtest accurate?

For this kind of strategy, it's accurate about the signals and optimistic about the money. TradingView is a great place to find and read strategies, and the Strategy Tester is a fine tool for checking an idea. But the number it prints isn't the number your broker account would print. None of this is hidden, it's all in TradingView's own docs, and you can fix some of it yourself. Most people don't, though, and this script doesn't.

TradingView Strategy Tester A real broker account This test
Spread Fills on the chart's single price series. There's no spread setting You buy at the ask and sell at the bid, and the spread widens around news and the daily rollover Real bid and ask on every tick. Median spread 0.063 USD on gold, 0.5 pip on NZDUSD, with NZDUSD daily opens hitting 7.4 pips at the 95th percentile
Commission 0 unless you set it. This script doesn't About 3.5 USD per lot per side on a Raw account Included
Slippage 0 unless you set it Real Not modelled separately. Orders fill on the first tick of the next bar
Swap No setting for it Charged or paid every night, triple on Wednesdays Not included either (see the risk section)
Price data Whatever vendor's symbol you load, not your broker's. Forex daily bars usually close at 17:00 New York Your broker's candles and server time Exness ticks, daily bars cut at UTC midnight
Fills inside a bar Assumes a price path through open, high, low and close. Bar Magnifier uses lower-timeframe data, but needs a Premium or Ultimate plan Tick by tick Doesn't matter much here, because this script has no stop loss or take profit
History Depends on your plan Jan 2020 to Sep 2026, split into three periods

Here's what the cost gap looks like in practice. "No costs" is my port with the same zero-cost defaults the script uses on TradingView. I didn't run it on TradingView itself.

Test Trades PF, no costs PF, real costs Net, no costs → real
Gold M15, Raw account 4,007 1.06 1.03 +1,447 → +808 USD
Gold M15, Cent account 4,047 1.04 1.00 +1,072 → +48 USD
NZDUSD M15 4,653 0.92 0.80 −3,534 → −9,298 pips
NZDUSD H1 1,115 0.92 0.86 −1,594 → −3,003 pips
Gold H4, Raw account 267 1.98 1.97 +4,038 → +3,997 USD

So the pattern is simple. The more often a strategy trades, the wider the gap between the TradingView screen and your account. On gold M15 with a Cent account, costs took 96% of the profit. On gold H4, with only 267 trades in six years, they barely register. That's the reason this post exists.

What is the SuperTrend STRATEGY?

It's the SuperTrend STRATEGY by KivancOzbilgic, published in September 2020 under the Mozilla Public License, with 25,185 boosts and 657,438 views when I checked on 21 September 2026. It turns the classic SuperTrend indicator into something you can backtest.

The rules fit in one breath. Take the bar's midpoint (high plus low, divided by two), then draw a line 3 × ATR(10) below it and another 3 × ATR(10) above it. The lower line can only move up while the trend is up, and the upper line can only move down while the trend is down. When a candle closes above the upper line, the strategy goes long. When one closes below the lower line, it goes short.

It's always in the market. A new signal closes the current trade and opens the opposite one, and there's no stop loss, no take profit and no separate trailing stop. Here's the core of the Pine code, © KivancOzbilgic:

atr = changeATR ? atr(Periods) : atr2
up = src - (Multiplier * atr)
up1 = nz(up[1], up)
up := close[1] > up1 ? max(up, up1) : up
dn = src + (Multiplier * atr)
dn1 = nz(dn[1], dn)
dn := close[1] < dn1 ? min(dn, dn1) : dn
trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend
buySignal = trend == 1 and trend[1] == -1
sellSignal = trend == -1 and trend[1] == 1

Does the SuperTrend strategy repaint?

No. Signals are calculated on closed bars, and the order fills at the open of the next bar. Nothing in the script looks at a higher timeframe or at future data. What you see on a historical chart is what you'd have got at the time, before costs.

What does the author claim?

Not much, which is to the author's credit. There's no profit figure anywhere on the page.

Claim in the description What I checked
Works on equities, futures, forex and crypto, on daily, weekly and hourly charts Gold and NZDUSD, on M15, H1, H4 and D1
"Gives an accurate reading about an ongoing trend" Whether the trend reading makes money after costs
"Generally, it fails in a sideways-moving market" Performance in 2022–2023, when gold went sideways
Default settings: ATR period 10, multiplier 3 Default, plus a 4 × 4 grid around it

How I tested it

  • Port: I rewrote the Pine script in Python and checked it against a separate line-by-line translation of the Pine logic. Trend and signals matched on every bar.
  • Data: tick archives from Exness. XAUUSD Raw Spread from 29 January 2020 (that's where the archive starts), XAUUSDc (Cent account) from 1 January 2020, and NZDUSD Raw Spread, all to 16 September 2026.
  • Costs: longs fill at the real ask and shorts at the real bid. On Raw accounts I added 3.5 USD per lot per side for commission. I didn't include swap.
  • Runs: four timeframes, each with and without costs, on three data sets. Results were split into three periods (2020–21, 2022–23, 2024–26), plus a parameter grid on H1, H4 and D1.
  • Units: fixed size, no compounding. Gold results are in USD per ounce, which is the same as USD per 0.01 lot. NZDUSD results are in pips.

The results

Gold (XAUUSD Raw Spread), 29 Jan 2020 – 16 Sep 2026, default settings, after spread and commission, before swap:

Timeframe Trades Win rate Profit factor Net (USD per 0.01 lot) Max drawdown
M15 4,007 34.0% 1.03 +808 1,516
H1 927 37.1% 1.11 +1,290 924
H4 267 43.4% 1.97 +3,997 782
D1 63 33.3% 0.93 −243 1,552
Buy and hold 1 +2,703 1,527

TradingView SuperTrend strategy equity curve on XAUUSD H4 versus buy and hold gold, Jan 2020 to Sep 2026, Exness ticks, spread and commission included, swap not included

The Cent account gave the same picture. Every timeframe landed within 0.05 of the Raw profit factor, so the type of account isn't what drives these results.

NZDUSD Raw Spread, Jan 2020 – 16 Sep 2026, same settings:

Timeframe Trades Win rate Profit factor Net (pips) Max drawdown (pips)
M15 4,653 33.1% 0.80 −9,298 9,989
H1 1,115 35.6% 0.86 −3,003 4,029
H4 293 35.8% 0.81 −2,237 2,770
D1 51 49.0% 1.55 +1,546 1,485

TradingView SuperTrend strategy equity curves on NZDUSD for M15, H1, H4 and D1, Jan 2020 to Sep 2026, Exness ticks, spread and commission included

Where does it break?

This is the part I'd read if I were thinking of running it.

It needs a trend, and it needs the right one. Here's gold H4 by period:

Gold H4 Trades Profit factor Net (USD per 0.01 lot)
2020–2021 82 1.09 +100
2022–2023 86 1.02 +25
2024–Sep 2026 99 3.19 +3,871

That's four years of roughly break-even, then one very good run. The author said it would struggle in sideways markets, and it did.

Profit factor of the SuperTrend strategy by period and timeframe for XAUUSD and NZDUSD, 2020 to 2026, after costs

What are the best SuperTrend settings? It depends on which years you test, and that's the problem. Over the full test, multiplier 3 looks strong at every ATR period (1.62 to 1.97). Take only 2020–2023, though, and multiplier 2 is the best column (1.29 to 1.47) while the default falls to 1.05. The "best" setting is simply the one that happened to fit the 2024–2026 rally.

Heatmap of SuperTrend strategy profit factor on XAUUSD H4 by ATR period and multiplier, full test versus 2020 to 2023 only

A few trades carry the result. On gold H1, the five biggest winners add up to +1,493 USD. Take them out and the other 922 trades lose 203 USD. On NZDUSD D1, which is the only green NZDUSD line, three trades make 88% of the profit. Change the multiplier from 3 to 4 there and the profit factor drops to 0.79.

The short side mostly loses. On gold, shorts lost money on M15 (−947), H1 (−705) and D1 (−1,466). Only H4 made anything on the short side (+648). So most of what looks like an edge is really the strategy riding a market that went up.

Risk structure

  • No stop loss. A trade closes only when the opposite signal appears, however far price moves first.
  • Trades last a while. Average hold on gold H4 is 9.0 days (longest 62), and on gold D1 it's 37.9 days (longest 186). NZDUSD H4 averages 8.2 days and NZDUSD D1 averages 47.0.
  • Swap will make these numbers worse. Because the strategy is always in a trade, it pays overnight financing almost every night, triple on Wednesdays, in whichever direction it happens to be. Swap is occasionally positive on one side of a pair. For a system that flips both ways, though, I'd assume it costs you, unless your account is swap-free.
  • Drawdown in money terms. Gold H4's worst drawdown was 782 USD per 0.01 lot. That's 7.8% of a 10,000 USD account trading 0.01 lot, and 78% at 0.1 lot.
  • What isn't a red flag: there's no martingale, no grid and no averaging down. A 35–43% win rate is normal for trend following. Losing streaks of 8 trades on gold H4 and 13 on NZDUSD H1 are normal too.

So, does SuperTrend work?

On gold during a strong trend, yes. It beat buy and hold by about 1,300 USD per 0.01 lot with half the drawdown, but only because of 2024–2026. On a pair that mostly ranged, like NZDUSD, it didn't, on any timeframe where it traded often enough to judge. The indicator does what it says. It just doesn't find money where there's no trend.

Who should use it?

I'd use it as a trend filter or as an exit line inside another system, on gold or other trending instruments on H4. I wouldn't run it on its own on a forex pair. And if you do run it on its own, go in expecting a year or several where it goes nowhere: gold H4 made 125 USD per 0.01 lot across the whole of 2020–2023.

What I couldn't verify

  • Swap. It isn't in any number above.
  • An MT5 Strategy Tester run on real ticks. I plan to run gold H4 in MT5 and will update this post with the result.
  • Tick quality. In my own check against MT5 ticks, about 23% of archive ticks were shifted by up to 0.30 USD on gold. With trades lasting days, that barely matters, but it isn't zero.
  • Only two instruments. I tested gold and one forex pair. I didn't test crypto, even though the author's example chart is BTCUSDT daily, and I didn't test stocks.
  • Daily candles. My daily bars close at UTC midnight. TradingView's forex daily bars usually close at 17:00 New York, so D1 results won't match a TradingView chart bar for bar.
  • TradingView itself. I didn't run the script on TradingView, so the "no costs" figures come from my port, not from their tester.

Bottom line

Before swap, the TradingView SuperTrend strategy made money on gold H4 only because gold trended hard in 2024–2026, and it lost on NZDUSD everywhere it traded often. It's a good trend filter and a poor standalone robot.

Next in the series is another strategy from the same top-100 list. If you want to see what happens when one of these scripts becomes an EA, Aeolus started from an open-source TradingView strategy too. That one's my own product, so read it as a product post, not an independent review.

I'm not affiliated with TradingView or with KivancOzbilgic. Past results, including backtests, don't guarantee future results.