Using the Array to save only X HIGHEST HIGHS and Y LOWEST LOWS.
By the X and Y i build a tunnel - X is the top line (highs) and Y bottom line (lows)
Green - Up Trending
Red - Down Trending
Yellow - Reversal / drawback might occur.
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.