Update, 21 Sep 2026. I put this result through a harder test after publishing, and the first optimized version below didn't survive it. The final, sturdier version and its numbers are in Extended results near the end. Everything else is the original write-up, unchanged.

The short version. This is part 2 of my SuperTrend strategy optimization, and it's for gold only (XAUUSD, H4). I kept the TradingView script's entries exactly as they were and changed what happens after them.

  • Gold H4, Jan 2020 to Sep 2026: the profit factor in the worst of three periods went from 1.02 to 1.65, and the worst single year went from 0.77 to 1.59. There's no losing year left.
  • The cost: total profit per 0.01 lot fell from 3,997 USD to 1,359 USD, because the big 2024–2026 runs get cut shorter. Drawdown fell from 658 to 173.
  • With risk-based sizing on a 10,000 USD account, 2% risk per trade grew it to 21,605 USD with a 5.7% maximum drawdown.
  • Still missing: swap, and a real-tick run in MT5. I'm not publishing the exact rules yet.

My verdict: promising enough to take to the next stage, which is a real-tick test in MetaTrader 5. It's not proven yet.

Where part 1 left off

In part 1 I ported KivancOzbilgic's SuperTrend STRATEGY from TradingView and ran it on 6.7 years of Exness ticks with real spreads and commission. On gold H4 it made a profit factor of 1.97, but almost all of that came from the 2024–2026 rally. From 2020 to 2023 it was roughly break-even. On NZDUSD it lost on M15, H1 and H4.

The entries weren't the problem on gold. The question was whether better exits could hold on to the good years without giving everything back in the flat ones.

What did I change?

Two things, and neither of them is the entry signal.

  1. A trade-management layer. It decides how each position is protected once it's open and when it's closed early, instead of sitting in every trade until SuperTrend flips.
  2. Risk-based position sizing. Lot size comes from a fixed percentage of the account rather than a fixed 0.01 lot, so a trade in 2026 carries the same risk as a trade in 2020, even though gold's price nearly tripled in between.

The SuperTrend signals are exactly the ones from part 1: same 267 entries, same timestamps.

This is a gold-only optimization. Every setting was chosen on XAUUSD H4 and nothing else. I didn't tune it for forex pairs, indices or other timeframes, and the next section shows why you shouldn't assume it carries over.

I'm keeping the exact rules and settings to myself for now. I may turn this into an EA, and I don't want to publish numbers that someone copies into a live account before it has passed a real-tick test. What I can show is how it was tested, which is the part that tells you whether to trust it.

Results with a fixed 0.01 lot

Gold (XAUUSD Raw Spread), H4, 29 Jan 2020 to 16 Sep 2026, spread and commission included, swap not included:

Original SuperTrend With trade management
Trades 267 267
Profit factor 1.97 1.97
PF in the worst period 1.02 1.65
PF in the worst year 0.77 1.59
Losing years 2 (2021, 2022) 0
Net profit, USD per 0.01 lot +3,997 +1,359
Max drawdown on closed trades 658 173
Win rate 43.4% 52.8%
Average holding time 9.1 days 1.2 days

Closed profit of the SuperTrend strategy on XAUUSD H4, original versus with trade management, Jan 2020 to Sep 2026, Exness ticks, swap not included

The overall profit factor didn't move. What moved is where the profit comes from. The original made most of its money in two years. The managed version makes a smaller amount every year, which is a much easier thing to live with.

Profit factor by year of the SuperTrend strategy on XAUUSD H4, original versus with trade management, 2020 to 2026

Did I just curve-fit it?

That's the first thing I'd ask, so here's what I checked.

  • Neighbouring settings. A result that only works at one exact setting is noise. I ran 35 nearby combinations with the full management in place. The worst-period profit factor stayed above 1.0 in all 35 (lowest 1.06, highest 1.90), and above 1.3 in half of them. The chosen one isn't the highest, and it isn't alone.
  • Walk-forward. I picked the settings using only 2020–2023, then looked at 2024 to Sep 2026, which the choice never saw. The same settings came out on top, and the unseen period made a profit factor of 2.01.
  • Random entries. I replaced the SuperTrend signals with random entries at the same frequency and kept the same management, 20 times. The median profit factor was 0.96, and the best worst-period result was 1.16. So the management alone isn't the edge. It works on top of SuperTrend's entries, not instead of them.
  • Every piece earns its place. Switching off any single part of the management lowered the worst-period profit factor, to somewhere between 1.05 and 1.56.
  • A second data set. On the Exness Cent gold feed (XAUUSDc) the worst-period profit factor was 1.62, against 1.65 on Raw.

Worst-period profit factor of SuperTrend with trade management compared with 20 runs of random entries using the same management, XAUUSD H4

What does risk-based sizing add?

Same trades, 10,000 USD starting balance, compounding, Jan 2020 to Sep 2026, before swap. The drawdown column includes the worst open loss inside each trade, which is closer to what MT5 reports as equity drawdown.

Risk per trade Final balance Per year Max drawdown Worst year
1% 13,979 USD 5.2% 2.5% +2.5%
2% 21,605 USD 12.4% 5.7% +6.0%
3% 31,146 USD 18.8% 8.4% +8.8%

Account equity of the optimized SuperTrend strategy on XAUUSD H4 at 1%, 2% and 3% risk per trade, 10,000 USD start, 2020 to 2026

At 3% the yearly results were +23% (2020), +25% (2021), +9% (2022), +20% (2023), +14% (2024), +22% (2025) and +12% (2026 to mid-September). Those are backtest numbers on one instrument, before swap. I'd treat them as an upper bound, not a forecast.

Where does it still fail?

I optimized for gold H4 only. For context, here's what happened when I ran the same layer elsewhere, without re-tuning it:

  • It gives up the big runs. In 2026 the original made 2,432 USD per 0.01 lot on gold H4. The managed version made 216. If you believe gold will trend like that again, the original catches more of it.
  • Gold H1 didn't improve. On gold H1 the same kind of management made things worse. The result holds on H4 only.
  • NZDUSD is still a loser. On H4 the profit factor went from 0.80 to 0.96, still a loss, and on H1 it got worse (0.86 to 0.77). Management can't create a trend where there isn't one.

What I haven't verified yet

  • Swap. Still not included. Trades now last 1.2 days on average instead of 9.1, so the strategy spends about 86% fewer nights in the market. The effect will be much smaller than in part 1, but it won't be zero.
  • Real ticks in MT5. These results come from checking every minute of Exness archive data. The management reacts to price inside the bar, so it's more sensitive to tick detail than the original strategy was. Within each minute I assumed the worse outcome happens first. A real-tick run in MetaTrader 5 is the next step, and I'll update this post with it.
  • One instrument, by design. This optimization is for gold H4 only, over one 6.7-year stretch that included a strong bull market. Don't read it as a result for any other market.

Extended results: does it survive a harder test?

Short answer: the first version didn't. The final one does.

The test. I kept everything the same and only moved the hour at which the H4 candles open: 00:00, 01:00, 02:00 and 03:00 UTC. A real edge shouldn't care about that. It isn't an academic check either, because your broker's server time decides where your H4 candles start, and brokers don't agree on it.

H4 candles open at 00:00 01:00 02:00 03:00
First optimized version, PF 1.87 1.14 1.36 1.16
First optimized version, PF in the worst period 1.59 0.74 0.79 0.96
Final version, PF 1.46 1.45 1.38 1.33
Final version, PF in the worst period 1.38 1.32 1.37 1.22

The first version only looked good at 00:00. Shift the candles by an hour and it fell below break-even in its worst period. The walk-forward and random-entry checks above didn't catch it, because they all used the same candle timing. That's a lesson I'm keeping: every result on this blog now has to pass this test too.

Worst-period profit factor at four different H4 candle opening hours, first optimized version versus final version, XAUUSD 2020 to 2026

What changed. I re-ran the optimization and scored every setting by its worst result across the four candle timings, not its best. The SuperTrend signals are still the originals. What changed is how trades are managed and how risk is spread, and some parts of the first version didn't make the cut. As before, I'm not publishing the rules.

The final version against the unmodified SuperTrend, both run the same way, XAUUSD Raw, Jan 2020 to Sep 2026, spread and commission included, swap not included:

Unmodified SuperTrend Final version
Profit factor 1.47 1.40
PF in the worst period 1.15 1.33
Yearly return per unit of drawdown 0.52 0.86
Same, 2020–2023 only 0.21 0.97
Worst year −3.6% +2.1%

The overall profit factor is actually a little lower. What improved is everything that decides whether you can live with it: the weak years are much stronger and there's no losing year.

Same drawdown, different result. Here both start with 50,000 USD, compounding, each sized so the worst drawdown on closed trades lands at about 20%.

Account equity from 50,000 USD, unmodified SuperTrend versus final optimized version, both sized to about the same drawdown, XAUUSD H4 2020 to 2026

Unmodified SuperTrend Final version
Final balance 96,974 USD 167,627 USD
Per year 10.6% 20.1%
Max drawdown, closed trades 20.3% 21.7%
Worst year −6.6% +5.8%

And the final version at three risk levels, 50,000 USD start:

Risk level Final balance Per year Max drawdown Worst year
Low 88,390 USD 9.0% 10.3% +3.5%
Medium 167,627 USD 20.1% 21.7% +5.8%
High 286,248 USD 30.2% 31.7% +7.8%

Read these with the same caveats as before, plus two new ones.

  • Swap still isn't included, and there's still no real-tick MT5 run.
  • The drawdown here is measured on closed trades. Equity drawdown, the number MT5 shows, will be higher.
  • The final version needs a bigger account. Below roughly 50,000 USD the minimum lot size stops it from sizing trades properly, and it starts skipping them.
  • 6.6 years of data include one sideways stretch and one strong rally, but no long gold bear market.

The tools behind this, and what I sell

The trade management in this part is code I wrote for the test, not something on sale. The closest things I do sell are trend stops built the same way:

  • Money Moves settles the level that decides the next flip at the close of the current bar, so the line you planned around cannot move under you mid-bar.
  • Moonshine Pivot Trend anchors its trailing stop to confirmed swing pivots, so the line holds flat for days instead of being dragged along by every candle.
  • Trend Targets only calls a trend when its trailing line has moved the same way three bars running, so a single tag of the line changes nothing.

They draw the level. The sizing and the exits above are still your job.

Bottom line

Before swap and before a real-tick check, adding trade management and risk-based sizing to the TradingView SuperTrend strategy turned gold H4 from "four flat years, then a rally" into seven profitable years out of seven, at a third of the original profit per lot. That's promising, and not yet proven. The first version turned out to depend on the hour the candles open; the final version in the extended results doesn't, and it's the one I'm taking to the MT5 real-tick test.

If you're reading this before the MT5 update, go back to part 1 for the unmodified strategy and all its tables.

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