PROTECTED SOURCE SCRIPT

Swing Structure + High/Low PG/PB Calculation

39
This script detects swing structure using a locked ZigZag: a pivot is confirmed only after price reverses by a user-defined percent or ATR threshold with a minimum bar spacing. It draws the latest swing leg and projects PG (trend extensions) and PB (pullback) levels from the last confirmed pivot. Alerts fire exactly on the bar where a Pivot High or Pivot Low is confirmed. The script does not repaint: pivots are added only after the reversal threshold is met.
Inputs: method (Percent/ATR), percent/ATR settings, minimum bars between pivots, number of swing segments to draw, PG/PB level sets, and alert filters (close-only / realtime).

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.