A trend indicator based on ATR bands that switches on a trend change.
Supertrend plots a line above or below price based on ATR and switches when price breaks through it. When price is above the Supertrend line — an uptrend; below — a downtrend. It is used as a trend filter and for setting trailing stops.
Formula:
ATR = ATR(period)
Basic Upper = (High + Low)/2 + multiplier * ATR
Basic Lower = (High + Low)/2 - multiplier * ATR
Supertrend switches to uptrend when Close > Upper Band of the previous downtrend