MACD= shorter term moving average - longer term moving average
When the MACD is positive, it signals that the shorter term moving average is above the longer term moving average and suggests upward momentum. The opposite holds true when the MACD is negative - this signals that the shorter term is below the longer and suggest downward momentum. When the MACD line crosses over the centerline, it signals a crossing in the moving averages. The most common moving average values used in the calculation are the 26-day and 12-day exponential moving averages. The signal line is commonly created by using a nine-day exponential moving average of the MACD values. These values can be adjusted to meet the needs of the technician and the security. For more volatile securities, shorter term averages are used while less volatile securities should have longer averages.
Another aspect to the MACD indicator that is often found on charts is the MACD histogram. The histogram is plotted on the centerline and represented by bars. Each bar is the difference between the MACD and the signal line or, in most cases, the nine-day exponential moving average. The higher the bars are in either direction, the more momentum behind the direction in which the bars point.
As you can see in Figure one of the most common buy signals is generated when the MACD crosses above the signal line (blue dotted line), while sell signals often occur when the MACD crosses below the signal.