When price hits top of bands, it is considered as start or continuation of uptrend. When price hits bottom of the band it is considered as start or continuation of downtrend. Hence, supertrend is drawn based on these calculations. Use ATR Periods and ATR Multiplier to create stops certain ATR away from band's top and bottom.
Other supertrend adoptions published are here:
based channel is published here:
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
Join tradingview: https://www.tradingview.com/gopro/?share_your_love=sudh
It may sound you vague but need of small petty traders community is requested.
Thankyou and appreciate your wonderfull work.