OPEN-SOURCE SCRIPT
Aggiornato MACD Multi-Timeframe x4 (Custom Params)

■About this indicator
・This indicator can display 4 MACD lines for different time frames. (Multi-time framework)
・The color of the MACD line changes when the MACD has a golden or dead cross.
All MACDs can be set individually for long time period, short time period, and signal smoothing.
All MACDs can show/hide MACD lines, signal lines, histograms, and select colors.
■Explanation of effective usage
By displaying MACDs in multiple time frames, you can time the push.
For example, let's say you have three MACDs: one weekly, one daily, and one hour.
With the weekly and daily MACDs continuing to golden cross, the timing for the hourly MACD to golden cross is considered a push opportunity.
An example chart is attached below for your reference.
The area circled vertically is a push-buying opportunity.
Yellow-green: Weekly Green: Daily Light blue: Hourly
-------------------------------------------------------------------------------------------------------------
■このインジケーターについて
・このインジケーターは別の時間軸の4本のMACDを表示させることが出来ます。(マルチタイムフレームワーク)
・MACDがゴールデンクロス・デッドクロスした場合にMACDラインの色が変化します。
・全てのMACDについて個別に長期の期間・短期の期間・シグナルの平滑化を設定できます。
・全てのMACDはMACDライン・シグナルライン・ヒストグラムの表示/非表示、色の選択ができます。
■有効な使い方の説明
マルチタイムフレームでMACDを表示することで、押し目のタイミングを計ることが出来ます。
例えば、3本のMACDを1週間・1日・1時間とします。
週足と日足のMACDがゴールデンクロスを継続した状態で、1時間足のMACDがゴールデンクロスしてくるタイミングは押し目買いのチャンスと考えられます。
以下に例題のチャートを付けますので、参考にしてください。
縦に囲った辺りが押し目買いのチャンスになります。
黄緑:週足 緑:日足 水色:1時間足
・This indicator can display 4 MACD lines for different time frames. (Multi-time framework)
・The color of the MACD line changes when the MACD has a golden or dead cross.
All MACDs can be set individually for long time period, short time period, and signal smoothing.
All MACDs can show/hide MACD lines, signal lines, histograms, and select colors.
■Explanation of effective usage
By displaying MACDs in multiple time frames, you can time the push.
For example, let's say you have three MACDs: one weekly, one daily, and one hour.
With the weekly and daily MACDs continuing to golden cross, the timing for the hourly MACD to golden cross is considered a push opportunity.
An example chart is attached below for your reference.
The area circled vertically is a push-buying opportunity.
Yellow-green: Weekly Green: Daily Light blue: Hourly
-------------------------------------------------------------------------------------------------------------
■このインジケーターについて
・このインジケーターは別の時間軸の4本のMACDを表示させることが出来ます。(マルチタイムフレームワーク)
・MACDがゴールデンクロス・デッドクロスした場合にMACDラインの色が変化します。
・全てのMACDについて個別に長期の期間・短期の期間・シグナルの平滑化を設定できます。
・全てのMACDはMACDライン・シグナルライン・ヒストグラムの表示/非表示、色の選択ができます。
■有効な使い方の説明
マルチタイムフレームでMACDを表示することで、押し目のタイミングを計ることが出来ます。
例えば、3本のMACDを1週間・1日・1時間とします。
週足と日足のMACDがゴールデンクロスを継続した状態で、1時間足のMACDがゴールデンクロスしてくるタイミングは押し目買いのチャンスと考えられます。
以下に例題のチャートを付けますので、参考にしてください。
縦に囲った辺りが押し目買いのチャンスになります。
黄緑:週足 緑:日足 水色:1時間足
Note di rilascio
■ About this indicatorThis is a multi-timeframe MACD indicator that allows you to display up to four MACD indicators from different timeframes (e.g., 1H, 1D, 1W, 1M) on a single chart. Each MACD is calculated using the standard MACD formula:
MACD = EMA(short) - EMA(long), and the signal line is the EMA of the MACD line.
You can fully customize each MACD instance, including:
Short, long, and signal periods
Timeframe for each MACD
Whether to show/hide MACD lines, signal lines, and histograms
Color settings for each element
A unique feature of this indicator is that the MACD line color changes dynamically when a Golden Cross (MACD > Signal) or Dead Cross (MACD < Signal) occurs, allowing for better visual cues on trend shifts.
This script uses request.security() to pull data from different timeframes accurately and align them on the current chart.
■ How to Use
The goal of this indicator is to help identify multi-timeframe alignment. For example:
If the weekly and daily MACDs are both in a bullish crossover (golden cross), and the 1H MACD also enters a golden cross, this could be a good pullback-buying opportunity.
This setup can be used effectively in trend-following strategies, especially for swing and intraday traders who want to align entries with larger timeframe momentum.
An example chart is attached below.
The vertical highlighted area marks a potential buy signal where MACDs align across timeframes.
-------------------------------------------------------------------------------------------------------------
■ このインジケーターについて
このインジケーターは、異なる時間軸のMACDを最大4本まで同時に表示できるマルチタイムフレーム対応のMACDインジケーターです。
各MACDは、一般的なMACDの計算式に基づいて算出されています:
MACD = EMA(短期)− EMA(長期)
シグナルラインは、MACDラインに対するEMAとなっています。
各MACDに対して以下の設定が可能です:
短期・長期・シグナルの期間設定
表示する時間軸の選択(例:1時間足、日足、週足など)
MACDライン・シグナルライン・ヒストグラムの表示/非表示
各要素の色設定
このインジケーターの特徴的な機能として、「MACDがゴールデンクロスまたはデッドクロスしたタイミングでMACDラインの色が自動的に変化する」ため、トレンドの転換点が視覚的に分かりやすくなっています。
複数時間軸のデータ取得には request.security() 関数を利用しており、異なるタイムフレームのMACDを現在のチャートに正確に同期して表示しています。
■ 有効な使い方の例
このインジケーターは、複数時間軸のトレンド方向の整合性を確認することで、エントリーや押し目のタイミングを見極めるのに役立ちます。
たとえば:
週足と日足のMACDが共にゴールデンクロスを継続している状況で、1時間足のMACDもゴールデンクロスしてきた場合、上位足のトレンドに沿った押し目買いの好機と判断できます。
このように、スイングトレードやデイトレードなど、上位足のトレンドに従う戦略において効果的に活用できます。
下に添付したチャートの例では、縦に囲った部分が複数のMACDが揃った押し目買いのチャンスとなるポイントです。
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.