MACD

Description

MACD (Moving Average Convergence/Divergence) is an oscillator study that is widely used for assessment of trending characteristics of a security. Calculated as the difference between two price averages, this indicator also provides a signal line, an average of that difference. Crossovers of the MACD plot and the signal line often produce valuable signals for trend analysis.

When the MACD plot crosses above the signal line, an uptrend may be emerging; conversely, when it falls below, a downtrend is likely to be identified. The difference between the MACD and signal values is plotted as a histogram, which may sometimes give you an early sign that a crossover is about to happen. Actual indication of the crossovers can be enabled by setting the show breakout signals parameter value to yes

Input Parameters

Parameter Description
fast length The number of bars used to calculate the fast moving average.
slow length The number of bars used to calculate the slow moving average.
macd length The number of bars used to calculate the moving average of MACD.
average type

The type of moving average to be used in calculations: simple, exponential, weighted, Wilder's, or Hull.

show breakout signals

Controls indication of MACD crossovers above and the signal line. 

Plots

Plot Description
Value

The Moving Average Convergence/Divergence plot.

Avg The moving average of the MACD.
Diff The difference between the MACD and its moving average (MACD Histogram).
ZeroLine Zero level.
UpSignal If enabled, displays an up arrow every time the MACD crosses above the signal line.
DownSignal If enabled, displays a down arrow every time the MACD crosses below the signal line.

Example*

*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.