Bands are calculated with the std error and variance of the price actions. So if price cross up or cross down the variance bands, you could expect a reversal movement.
So if price cross up with the bands and after that there is a reversal candle movement, a short position could be taken.
If price cross down to the bands and after that there is a reversal candle movement, a long positon could be taken.
All risk management and money management is up to you.
This is exactly the same as the Nadaraya-Watson Envelope Indicator. obviously it repaints. would have been awesome if there was a solution for it using pinescript. massive iteration require for the iteration to be done in the last bar and since that's the case we can only push the basis(y2) into an array instead of just assigning it as a series float where we could have referenced the history. and It changes value through out the window size on every new bar
UnknownUnicorn15320316
⋅
repaint n. weatson
sosso_bott
⋅
Nice work mate i could really use your help with something . i sent you a private message