OPEN-SOURCE SCRIPT
Moving Average Structure ZigZag [Stable & Filtered]

(日本語説明)
このインジケーターは、移動平均線(MA)の転換に基づき、相場の「真の構造」を可視化するために開発されました。 通常のZigZagのように価格の単純な反転に依存せず、「MAのトレンド転換 + 指定した値幅の到達」という2つの条件を用いることで、レンジ相場の細かなノイズ(ダマシ)を排除し、ダウ理論に基づいた重要な高値・安値だけを結びます。
💡 主な機能
- MAタイプの切り替え: SMA, EMA, HMA, VW-HMAなど、目的に合わせたトレンド感度を選択可能。
- 値幅フィルター(Min Deviation): 添付画像のように、小さな値動きをカットし、大きな市場構造だけを抽出します。
- 価格アクションへの追従: ラインはMAの数値ではなく、期間内の実最高値・最安値を正確に結び、高値更新時には自動で延伸されます。
🛠 活用シーン
- 環境認識: 上位足での大きな波形を確認し、現在のフェーズを定義。
- ノイズ除去: 市場の主要な節目(レジサポ候補)の特定。
- ダウ理論の視覚化: 高値・安値の切り上がり・切り下がりを明確化。
(English Description)
This indicator was developed to visualize the "True Market Structure" based on Moving Average (MA) reversals. Unlike standard ZigZag which relies solely on price reversals, this tool combines MA Trend Reversals and a Minimum Deviation filter to eliminate market noise and highlight significant swing highs and lows based on Dow Theory.
💡 Key Features
- Multiple MA Types: Select from SMA, EMA, HMA, VW-HMA, etc., to match your preferred trend sensitivity.
- Min Deviation Filter: As shown in the attached image, it filters out minor price fluctuations to extract only the major market waves.
- Price Action Tracking: The lines connect the actual High/Low prices within the period, not the MA values themselves. Lines automatically extend when a trend continues to new highs/lows.
🛠 Use Cases
- Market Context: Identify major wave patterns on higher timeframes to define the current phase.
- Noise Reduction: Pinpoint key market levels and potential support/resistance.
- Dow Theory Visualization: Clearly visualize higher highs/lows and trend shifts.
Settings
- MA Type: Choose the type of Moving Average.
- Moving Average Length: The lookback period for structure.
- Min Deviation (Pips): The threshold to filter noise. Adjust according to the volatility of the pair.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。