OPEN-SOURCE SCRIPT

Zigzag Tails [Trendoscope®]

🎲 Introducing Zigzag Tails Indicator by Trendoscope.

The Zigzag Tails Indicator, a groundbreaking tool from Trendoscope, redefines technical analysis by seamlessly integrating anchored VWAPs (Volume Weighted Average Prices) and Average Price calculations with Zigzag pivot points. This advanced indicator recalculates Average Price or VWAP from one Zigzag pivot to the next, offering unparalleled insights into market movements.

🎯 Innovative Design
Each Zigzag pivot can feature up to three distinct tails, corresponding to the high, low, and close prices of each candle. Users have the flexibility to select between Average Price and VWAP for display on their charts. By default, the indicator plots all three tails, but individual tail visibility is customizable via the settings panel.

  • Average Price Mode: When selected, tails depict the average price across a specified number of bars.
  • VWAP Mode: In this mode, tails represent the VWAP, calculated for a given price over a set number of bars.


🎯 Dynamic Dotted Tail
The Zigzag Tails Indicator features dotted tails that extend from the last Zigzag pivot to the current bar. These dotted tails dynamically adapt to market changes and are subject to repainting with the emergence of new Zigzag pivots.

  1. When repainting is enabled, the dotted tails originate from the last unconfirmed Zigzag pivot, extending to the current bar. This setting offers a more immediate, albeit tentative, visual representation of market trends.
  2. With repainting disabled, the dotted tails will be anchored from the last confirmed Zigzag pivot to the current bar, providing a more stable but slightly delayed market analysis.


Irrespective of the repaint option, the dotted dynamic tails is always expected to repaint.

🎯 Practical Applications
The Zigzag Tails Indicator provides more accurate support and resistance levels than traditional VWAP, rolling VWAP, or moving averages. Its precision makes it an invaluable tool for identifying trends, as well as potential trend continuations or reversals.

🛠 Indicator Settings

Zigzag Configuration:

  1. Zigzag Length determines the loopback length for the foundational Zigzag calculation.
  2. Number of Bars represent the calculation distance. This limitation is added to avoid runtime errors on lower timeframes. The calculations run through lots of loops. Hence, if it is run across too many bars, we may get timeout issues.
  3. Repaint: Activating this will also display the last, unconfirmed Zigzag pivot. Since the last pivot is inherently tentative, it may repaint with the arrival of new bars. A pivot is confirmed only when a subsequent unconfirmed pivot emerges on the chart.


Tail Configuration

  1. Tail Type: Choose between average and VWAP for the tail calculation. The average option plots a simple average, while the VWAP option calculates an anchored VWAP from pivot to pivot.
  2. Display Options: Tailored display options for High, Low, Close prices, with customizable colors for each tail type.


ảnh chụp nhanh

Inspired by the ideas of KioseffTrading's implementation of Zigzag Anchored VWAP
anchoredmaanchoredvwaphewhomustnotbenamedMoving AveragessupportandresitancetrendoscopeVolume Weighted Average Price (VWAP)Zig Zag Indicator

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm