Generate TradingView Pine Script v5 from ZigZag strategy parameters. Code is auto-validated using PineTS.