Generate TradingView Pine Script v5 from ZigZag strategy parameters. Code is auto-validated using PineTS.
Analyzes ZigZag pivots to identify trend structure (HH/HL/LH/LL) and projects next target zone.