OPEN-SOURCE SCRIPT
Dynamic MA Convergence (Smooth MTF)

DMC-MA (Dynamic MA Convergence) — Functional Details1. Multi-Timeframe (MTF) Monitoring LogicThis indicator doesn't just display a single MA; it constantly monitors the relationship between the "Current Timeframe" and its "Higher Timeframe (High-TF)" equivalent. When you switch charts, the indicator automatically selects the corresponding High-TF according to the following logic:Current Chart TFMonitored High-TF1 minute (1m)5 minutes (5m)5 minutes (5m)15 minutes (15m) *Optionally 30m15 minutes (15m)1 hour (1H)1 hour (1H)4 hours (4H)4 hours (4H)Daily (D)Daily (D)Weekly (W)Weekly (W)Monthly (M)2. Real-Time Status DetectionThe dashboard (table) and alerts categorize the distance and direction between the two MAs into four distinct states:Convergence: The short-term MA is moving toward the High-TF MA. This often indicates a "pullback" or "retracement" within a trend.Divergence: After converging, the MAs begin to separate again without crossing. This suggests a "trend continuation."Breakout / Breakdown: The short-term MA clearly crosses the High-TF MA. This indicates a potential "trend reversal" or shift in momentum.3. Smooth MTF Line (MA Interpolation)Standard MTF indicators often appear "stepped" or "jagged" when displaying higher timeframe data on lower timeframes. This script utilizes linear interpolation to calculate values for every single bar, resulting in a smooth, natural curve. This significantly improves the accuracy of price-action analysis and MA-touch detection.Technical Notes & CorrectionsLocalized Timeframe Labels:We have moved away from raw numerical IDs (like "60"). By setting the "Language" toggle to EN, all alert messages and table headers will display intuitive labels like "1H" instead of "60".5-Minute Chart Flexibility:Exclusively for the 5m chart, an option (Use 30m as High-TF) is included to switch the reference from 15m to 30m, catering to both scalpers and day traders.Calculation Integrity:The core detection algorithms (cross-detection and convergence direction) remain untouched, ensuring consistent logical performance.How to UseSet your preferred MA Length (Default: 20).Choose your Display Language (JP or EN).Configure Display Settings to show either the status of all timeframes or only the current one.
DMC-MA (Dynamic MA Convergence) — 機能詳細1. マルチタイムフレーム (MTF) 監視ロジック本インジケーターは、単一のMAを表示するのではなく、「現在の足」と「その一段上の上位足」のMAがどのような位置関係にあるかを常に監視します。チャートを切り替えると、以下の対応表に基づいて自動的に監視対象(上位足)が選択されます。表示中の時間足 (Current)監視対象の上位足 (High-TF)1分足 (1m)5分足 (5m)5分足 (5m)15分足 (15m) ※設定で30分に変更可15分足 (15m)1時間足 (1H)1時間足 (1H)4時間足 (4H)4時間足 (4H)日足 (D)日足 (D)週足 (W)週足 (W)月足 (M)2. リアルタイム・ステータス判定ダッシュボード(テーブル)およびアラートでは、MA同士の距離と方向から以下の4つの状態を判定します。収束 (Convergence): 短期MAが上位足MAへ向かって近づいている状態。押し目や戻りの形成を示唆します。拡散 (Divergence): 収束した後、交差せずに再び本来のトレンド方向へ離れていく状態。トレンドの再開を示唆します。上抜け・下抜け (Breakout/Down): 短期MAが上位足MAを明確にクロスした状態。トレンド転換の初動を示唆します。3. スムーズMTFライン (MA平滑化)通常、下位足チャートに上位足のMAを表示すると「階段状」にガタつきますが、本スクリプトは線形補間ロジックにより、バーごとに滑らかなラインを描画します。これにより、価格がMAにタッチしたかどうかの判定精度が向上しています。修正箇所と技術的な解説 / Correction & Technical Context時間足ラベルの言語対応:(JP) 以前の「60」などの数字表記を廃止しました。設定の「Language」をJPにすれば「1時間足」、ENにすれば「1H」と、アラートメッセージやテーブルの見出しが完全に切り替わります。(EN) Replaced raw numbers (e.g., "60") with localized labels. Setting the Language to "EN" displays "1H" across alerts and the dashboard.5分足の例外設定:(JP) 5分足を使用する場合のみ、上位足を15分ではなく「30分」に変更できるオプション(Use 30m as High-TF)を搭載しています。これにより、スキャルピングからデイトレードまで柔軟に対応可能です。ロジックの不変性:(JP) 判定アルゴリズム(交差判定、収束方向の計算)には一切変更を加えていません。導入方法移動平均線の期間(デフォルト20)を設定。表示言語(JP/EN)を選択。表示設定で、特定の時間足の状態を常時リストアップするか、現在の足のみ表示するかを選択。
DMC-MA (Dynamic MA Convergence) — 機能詳細1. マルチタイムフレーム (MTF) 監視ロジック本インジケーターは、単一のMAを表示するのではなく、「現在の足」と「その一段上の上位足」のMAがどのような位置関係にあるかを常に監視します。チャートを切り替えると、以下の対応表に基づいて自動的に監視対象(上位足)が選択されます。表示中の時間足 (Current)監視対象の上位足 (High-TF)1分足 (1m)5分足 (5m)5分足 (5m)15分足 (15m) ※設定で30分に変更可15分足 (15m)1時間足 (1H)1時間足 (1H)4時間足 (4H)4時間足 (4H)日足 (D)日足 (D)週足 (W)週足 (W)月足 (M)2. リアルタイム・ステータス判定ダッシュボード(テーブル)およびアラートでは、MA同士の距離と方向から以下の4つの状態を判定します。収束 (Convergence): 短期MAが上位足MAへ向かって近づいている状態。押し目や戻りの形成を示唆します。拡散 (Divergence): 収束した後、交差せずに再び本来のトレンド方向へ離れていく状態。トレンドの再開を示唆します。上抜け・下抜け (Breakout/Down): 短期MAが上位足MAを明確にクロスした状態。トレンド転換の初動を示唆します。3. スムーズMTFライン (MA平滑化)通常、下位足チャートに上位足のMAを表示すると「階段状」にガタつきますが、本スクリプトは線形補間ロジックにより、バーごとに滑らかなラインを描画します。これにより、価格がMAにタッチしたかどうかの判定精度が向上しています。修正箇所と技術的な解説 / Correction & Technical Context時間足ラベルの言語対応:(JP) 以前の「60」などの数字表記を廃止しました。設定の「Language」をJPにすれば「1時間足」、ENにすれば「1H」と、アラートメッセージやテーブルの見出しが完全に切り替わります。(EN) Replaced raw numbers (e.g., "60") with localized labels. Setting the Language to "EN" displays "1H" across alerts and the dashboard.5分足の例外設定:(JP) 5分足を使用する場合のみ、上位足を15分ではなく「30分」に変更できるオプション(Use 30m as High-TF)を搭載しています。これにより、スキャルピングからデイトレードまで柔軟に対応可能です。ロジックの不変性:(JP) 判定アルゴリズム(交差判定、収束方向の計算)には一切変更を加えていません。導入方法移動平均線の期間(デフォルト20)を設定。表示言語(JP/EN)を選択。表示設定で、特定の時間足の状態を常時リストアップするか、現在の足のみ表示するかを選択。
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.