The formula in plain words
Start with the midpoint of the current candle, the high plus the low divided by two. Add a multiple of the average true range to get a provisional upper level, and subtract the same amount to get a provisional lower level. True range for each candle is the largest of the high to low distance and the two distances from the previous close to the current high and low, so gaps are included.
Those two provisional levels are then filtered rather than plotted directly, which is the step most descriptions skip. While the indicator considers the market to be rising, only the lower level is active, and it is only allowed to move upward. While the market is considered to be falling, only the upper level is active, and it is only allowed to move downward. The line you see is whichever level is currently active. The state changes when a close crosses the active level, at which point the other level becomes active and the line jumps to the opposite side of price. Two inputs control everything: the range lookback and the multiple.
The ratchet is the part people miss
The filtering step deserves its own treatment because it explains the shape of the line. Each new candle produces a fresh provisional level that may be higher or lower than the previous one. In a rising state, the indicator keeps the higher of the new provisional lower level and the one it was already using. So the line climbs during advances and stays put during pullbacks, never retreating.
That is exactly the definition of a trailing stop. The line is not describing trend, it is recording the highest protective level that recent volatility has justified so far. Which means the distance between price and the line is not a measure of trend strength. It is a measure of how far price has run since the last time the level was allowed to move, combined with how volatile the market has been. Two charts can show the same visual gap for completely different reasons, and treating the gap as conviction is a misreading of what is being plotted.
What a flip actually asserts
When the colour changes, the statement being made is this: on this timeframe, with this lookback and this multiple, the close has crossed a level that was set a multiple of recent average range away from a candle midpoint. That is a complete description. It contains no claim about higher timeframe direction, no claim about structure, and no claim about whether the move will continue.
It follows that a flip is not evidence of a trend change in the sense traders usually mean. A trailing stop being hit is an event in your own risk management, not an event in the market. The same price action produces a flip on one setting and no flip on another, which could not be true of a genuine structural change such as a prior swing low being broken. If you want a claim about direction that survives a change of settings, look at whether the sequence of highs and lows has actually changed. The flip and the structural change sometimes coincide. When they do, it is the structure that carries the information.
The multiplier is the whole indicator
Nearly all of the behaviour comes from the multiple applied to average range. A small multiple places the level close to price, so it flips frequently and gives back little on each reversal. A large multiple places the level far away, so it flips rarely and surrenders a lot of the move before admitting a change. There is no value that avoids both costs, because they are two ends of the same trade off.
This has a direct implication for anyone optimising. Searching for the best multiple on past data is searching for the value that happened to match the size of the pullbacks in that sample, and pullback size changes with conditions. A setting that looked ideal in a quiet period will flip constantly in an active one. The lookback for the range term matters too, but less, because averaging over more candles mainly changes how quickly the width responds. If you are going to fix a value, fix it by deciding how much give back you are willing to accept in advance, which is a question about your own tolerance rather than about the data.
Flips that appear and vanish inside a forming candle
Here is a gap between how the line is tested and how it is traded. The state depends on the close. While a candle is still forming, the current price can cross the level and then move back, so the line can appear to flip and then unflip before the candle finishes. Anyone watching intraday sees a colour change that later disappears from the chart.
The consequence is that a rule tested on closed candles and traded on forming ones is not the same rule. Tests assume you acted at the close. Live, the temptation is to act when the colour changes, which is often several minutes earlier at a worse price and sometimes on a flip that never happens. If you intend to use the line, decide explicitly whether you act on the close of the candle or not, and then hold to it. The same discipline applies to the question of where the protective order sits, because placing it at the line means placing it at a value that will move on the next candle.
Two states, and no state for a range
The indicator is always in one of exactly two conditions. There is no third output meaning the market is going sideways. So when gold spends a session oscillating inside a narrow area, the line does the only thing it can: it flips back and forth, labelling each small swing as a new trend. Every one of those flips is arithmetically correct and none of them is informative.
This is the most common way the tool disappoints people, and it is not a flaw in the calculation. It is a missing category. The practical fix is to consult something that can say the market is currently in a condition where the model does not apply, which is exactly what a regime reading on the live chart is for. A tool whose main value is telling you to stand aside pairs naturally with one that has no concept of standing aside. Using the flip only when conditions are directional removes most of the noise, at the cost of the simplicity that made it attractive.
The week open problem on gold
One gold specific wrinkle deserves a mention. The state changes on a close crossing the active level, and the level does not care how price got there. If the market reopens after the weekend away from where it stopped, the first close of the new week can be on the other side of the level without a single trade having occurred in between. The indicator flips, and the flip reflects a discontinuity rather than any sequence of market activity.
On a daily chart that is a single candle and the effect is obvious. On faster charts the same reopening can produce a flip followed by an immediate reversal as the gap is worked back. There is no clean fix within the indicator itself. What you can do is know when it will happen and treat the first flips after a reopening with extra scepticism, in the same way you would treat any signal generated by a gap rather than by trading. The average range term is also inflated by that gap for the rest of its lookback, which widens the level afterwards.
A defensible way to keep it
Reduced to what it actually is, the line is a volatility scaled trailing stop with a clear rule and no discretion. That is genuinely useful for managing a position you entered for other reasons. It gives you a level that moves in one direction, which stops you from loosening a stop, and it adjusts with conditions, which stops you from using a fixed distance in a market that does not have a fixed character.
What it should not be is the reason you take a position. The flip tells you that a level derived from recent range has been crossed on one timeframe with one pair of settings. Build an entry around structure and location, use the line to manage the exit, and the behaviour you previously read as the indicator failing turns out to be the indicator doing its actual job. The limitation to keep in mind is the one from the section above: the level is furthest from price right after the most violent candles, which is exactly when you are most likely to want it close.
FAQ
What does a Supertrend flip mean?
It means the close crossed the currently active level, where that level sits a multiple of average true range away from a candle midpoint and has been carried forward in one direction only. It is a trailing stop being touched. It carries no information about higher timeframe direction or about whether the move will continue.
Which settings work best on gold?
The question assumes a best exists, and it does not. A small multiple flips often and gives back little, a large multiple flips rarely and gives back more. Optimising on past data finds the value that matched the pullbacks in that sample. Choose by deciding how much give back you can accept, then leave the setting alone.
Why does the line flip constantly in a quiet market?
Because the indicator has only two states and no category for sideways. In a narrow range each small swing crosses the active level, so each one is labelled a new trend. Every flip is arithmetically correct and none is informative. The usual remedy is to consult a separate read on whether conditions are directional before acting.
Can the line flip and then unflip?
On a forming candle, yes. The state is determined by the close, so price can cross the level mid candle and return before the candle finishes. That is why a rule tested on closed candles is not the same rule as one traded on live price. Decide which you are doing before you use it.
Why does it flip at the start of the week?
Because the state only requires a close on the other side of the level, and a reopening away from where the market stopped can deliver that without any trading in between. The flip reflects the discontinuity rather than market activity, and the same gap inflates the average range term for the rest of its lookback.
ⓘ See these ideas on real price: open the free XAUUSD live chart.