PROTECTED SOURCE SCRIPT

Swing Structure + High/Low PG/PB Calculation

37
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).

Отказ от ответственности

Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.