Moving Average Convergence Divergence (MACD)

Prev Next


Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that is calculated as the difference between 26-period and 12-period EMAs. MACD also provides a signal line, the average of that difference. The indicator triggers when MACD plot crosses above (buy) or below (sell) the signal line.

MACD = 12-period EMA - 26-period EMA
Singal Line = SMA (MACD)
Histogram = MACD -Signal Line

where:
EMA – Exponential Moving Average
SMA – Simple Moving Average

Moving Average Convergence DivergenceMoving Average Convergence Divergence

INPUTS

InputDescription
FastLengthThe number of bars used to calculate the fast moving average
SlowLengthThe number of bars used to calculate the slow moving average
MacdLengthThe number of bars used to calculate the MACD
Average
The following Moving Average types are available for calculations:
  • Simple. Simple Moving Average (SMA) is applied to MACD.
  • Wilders. Wilders Smoothing is applied to MACD.
  • Weighted. Weighted Moving Average (WMA) is applied to MACD.
  • Exponential. Exponential Moving Average (EMA) is applied to MACD.

PLOTS

The plot renders the data you are working with on the chart. You can show/hide a plot by clicking the corresponding item in the settings. Every plot has a set of basic settings that you can change: color, weight, and type.

PlotDescription
ValueThe Moving Average Convergence/Divergence plot
AvgThe moving average of the MACD
DiffThe difference between the MACD and its moving average (MACD Histogram)
Color

Click the color rectangle under the plot's name to open the palette. Use the slider at the bottom to set the opacity of the color.

Palette

To create a custom color:

  1. Clickto open the color picker
  2. By using the slider at the bottom, adjust the main color
  3. Then, set a shade for the main color on the palette

The custom-created colors are added to your palette. To remove a custom color, drag it out of the palette.

Weight
Change the value (in px) to adjust the thickness of the plot.
Type
The following plot types are available:
  • Linear. The plot is displayed as a line.
  • Column. The plot is displayed as a histogram.
  • Difference. The plot is displayed as a line which represents the difference between High and Low prices of the bar.
  • Points. The plot is displayed as points.
  • Text above candle. The plot is displayed as the price labels above candles on the chart.
  • Text below candle. The plot is displayed as the price labels below candles on the chart.
  • Triangle above candle. The plot is displayed as triangles above candles on the chart.
  • Color candle. The candles on candle-type charts are highlighted with specified colors.

OVERLAYING

Check Overlaying to display the indicator on the chart. Otherwise, the indicator is shown in a study pane down below.

Note: To reset the settings, click Restore to Default next to the SETTINGS: INDICATOR'S TITLE