OPEN-SOURCE SCRIPT
ZigZag

ZigZag Indicator – Overview
How It Works
Settings
What You See on the Chart
Why This ZigZag Is Useful
Recommended Use Cases
This ZigZag indicator highlights the most important swing highs and swing lows on the chart, helping traders see market structure more clearly by filtering out minor price movements. It connects significant turning points with straight lines, creating a clean visual representation of trend direction and major reversals.
How It Works
- Price constantly moves up and down, but not every movement is meaningful. The ZigZag indicator waits for price to make a move large enough to be considered a true swing point. Once such a movement occurs, the indicator identifies it as either a swing high or a swing low and draws a line connecting it to the previous swing.
- This produces a simplified outline of market structure, making it easier to recognize trends, corrections, and major turning points.
Settings
- ZigZag Length
Controls the sensitivity of the indicator.
Lower values produce more frequent swing points.
Higher values show only major swings and reduce noise. - Show ZigZag
Enables or disables the visual lines. When disabled, the indicator continues tracking swing points internally.
What You See on the Chart
- Every time the market creates a confirmed swing high or swing low, the indicator draws a line to the previous swing in the opposite direction.
- After a major low is confirmed, a line is drawn to the most recent high.
- After a major high is confirmed, a line is drawn to the most recent low.
- This creates a clear, continuous zigzag that outlines the dominant movements of the market without reacting to every small fluctuation.
Why This ZigZag Is Useful
- It does not repaint once a swing is confirmed.
- It provides a clean and simplified view of price structure.
- It helps identify trend direction, structure breaks, impulses, and corrections.
- It is useful for traders who follow price action, smart money concepts, and swing-based strategies.
Recommended Use Cases
- This ZigZag indicator is suited for traders who rely on market structure analysis, including:
- Swing trading
- Smart Money Concepts (BOS/CHOCH detection)
- Identifying impulses and pullbacks
- Finding strong highs and lows
- Studying overall trend direction
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.