Development aided by: but with the entirely different calculations presented in "Secrets of a Boss" by Franklin Ochoa. And far cleaner and less-redundant code.
To trade the indicator, watch the H3,H4,H5 and L3,L4,L5 bars. There are two built-in strategies. Depending on width, sell at H3 and buy at L3 with stop at H4/L4 or above. For strongly trending environments: buy at H4, cover at H5--similarly for downtrends.
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.