This is experimental script for zigzag which uses type, method and array. Not recommend for actual usage, for pine script study maybe useful. In this experiment, I use type as coded below. It seems have limitation as specially when push as array. As Trading View recommendation, pushing float and int into array especially for type not guarantee to work. I agree...
Predicting the future has nothing to do with trading, understanding your indicator and knowing how to use it does. Probably not the most efficient code, oh well.. Let me know if it's useful :)
Inspired by @bitmexstorm study Volatility-calibrated ATR This study features two different ATR trail derivative concepts-Default one is called- "Silicone", and the alternative is called- "Mercurial. To decrease confusion during backtesting, trails plots with distinct color palette. Options include the ability to apply a smoothening filter that affects both...