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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.