OPEN-SOURCE SCRIPT

Moving Average Convergence Divergence

50
日本語解説
インジケーター名
移動平均収束拡散 (MACD)

概要
トレンドの方向性、強さ、そして転換の可能性を示す、非常に人気の高いテクニカル指標です。短期と長期、2本の移動平均線から計算される「MACDライン」と、それをさらに平滑化した「シグナルライン」、そして両者の乖離(差)を示す「ヒストグラム」で構成されています。

このスクリプトの大きな特徴は、MACDラインとシグナルラインの計算に使う移動平均線の種類を、それぞれEMA(指数平滑移動平均)またはSMA(単純移動平均)から選択できる高いカスタマイズ性です。

主な機能と特徴
MACDライン (青/赤の線)

短期MAと長期MAの差を示します。ゼロラインより上なら強気、下なら弱気な局面の目安となります。
シグナルライン (オレンジの線)

MACDラインの移動平均線です。MACDラインがシグナルラインをどのようにクロスするか(ゴールデンクロス/デッドクロス)が、売買のタイミングを計る上で重要視されます。
ヒストグラム (緑/赤の棒グラフ)

MACDラインとシグナルラインの差を棒グラフで表したものです。
このインジケーターでは、棒の色の濃淡でトレンドの勢いの変化(加速・減速)を視覚的に表現しています。
濃い色: 勢いが加速している状態(例: プラス圏でヒストグラムが伸びている)
薄い色: 勢いが減速している状態(例: プラス圏でヒストグラムが縮んでいる)
アラート機能

ヒストグラムがゼロラインをクロスしたタイミング(MACDラインとシグナルラインがクロスした時)でアラートを通知させることができます。
設定項目
Fast Length: 短期MAの期間(初期値: 12)
Slow Length: 長期MAの期間(初期値: 26)
Signal Smoothing: シグナルラインの期間(初期値: 9)
Oscillator MA Type: MACDラインの計算に使用するMAの種類(EMA/SMA)
Signal Line MA Type: シグナルラインの計算に使用するMAの種類(EMA/SMA)
English Description
Indicator Name
Moving Average Convergence Divergence (MACD)

Description
A highly popular technical indicator that shows a trend's direction, strength, and potential reversal points. It consists of the "MACD Line" (calculated from two moving averages), the "Signal Line" (a smoothed version of the MACD line), and the "Histogram" which shows the divergence between these two lines.

A key feature of this script is its high customizability, allowing you to choose the type of moving average (EMA or SMA) for both the MACD and Signal line calculations.

Key Features
MACD Line (Blue/Red Line)

Shows the difference between the fast and slow moving averages. A value above the zero line suggests a bullish bias, while below suggests a bearish bias.
Signal Line (Orange Line)

An MA of the MACD Line. Crossovers between the MACD and Signal lines are often watched for potential trade signals.
Histogram (Green/Red Bars)

Represents the difference between the MACD and Signal lines as a bar chart.
In this indicator, the shades of the bar colors visually represent changes in momentum (acceleration and deceleration).
Darker Color: Indicates accelerating momentum (e.g., histogram is growing taller in the positive zone).
Lighter Color: Indicates decelerating momentum (e.g., histogram is shrinking in the positive zone).
Alert Function

You can set up alerts to be notified when the histogram crosses the zero line (which occurs when the MACD and Signal lines cross).
Settings
Fast Length: Period for the fast MA (Default: 12).
Slow Length: Period for the slow MA (Default: 26).
Signal Smoothing: Period for the Signal Line (Default: 9).
Oscillator MA Type: The MA type (EMA/SMA) used to calculate the MACD line.
Signal Line MA Type: The MA type (EMA/SMA) used to calculate the Signal line.

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.