2 PSAR added
3 Added ZigZag
4 You can control IZ zone based on the candle counts. e.g. Daily timeframe 21 candles 5 min timeframe 1000 candle etc.
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.