OPEN-SOURCE SCRIPT
已更新

Zig Zag with HHLL

2 275
This powerful tool calculates and displays two Zig Zag patterns simultaneously while dynamically identifying key market structure points—Higher Highs (HH), Lower Lows (LL), Higher Lows (HL), and Lower Highs (LH).

Because the script is dynamic, the most recent HH, HL, LL, or LH can update in real-time as price action evolves. For example, if the price continues to rise, a previously marked HL may be reclassified as an LL. Likewise, a falling LH may later turn into a HH if the market reverses.

This script is versatile and can be applied to various trading strategies, including trend analysis, support and resistance identification, breakout setups, and more.


Added a new input parameter decimals that allows you to control the decimal precision:

Set to -1 (default) for automatic detection based on the symbol's minimum tick size
Set to 0-8 for a specific number of decimal places.

How it works:

Auto mode (decimals = -1): The script automatically determines how many decimal places to show based on the instrument's minimum tick size. For example:

Forex pairs (0.00001) → 5 decimals
Stocks ($0.01) → 2 decimals
Crypto (0.00000001) → 8 decimals

Manual mode (decimals = 0-8): You can force a specific number of decimal places if needed
版本注释
Ehanced with fractals.

Key Benefits:

Comprehensive Analysis: Combines Zig Zag trend analysis with precise fractal identification
Clean Interface: Well-organized input groups make the script easy to configure
Flexible Display: Independent toggles for Zig Zag lines, HHLL labels, and fractals
Advanced Fractal Logic: Handles equal highs/lows for more accurate fractal detection
Visual Harmony: Fractals use subtle transparency (25%) to complement the Zig Zag lines

The script now provides a comprehensive market structure analysis tool, displaying both major trend changes (ZigZag) and precise reversal points (fractals) with full customization options. You can use them together for comprehensive analysis or independently as needed.
版本注释
Updated the script to allow accurate price display across all instruments

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。