The
| Parameter | Description |
| fast | Period for fast moving average (e.g. 12) |
| slow | Period for slow moving average (e.g. 26) |
| signal | Signal/smoothing period (e.g. 9) |
| maType | Type of moving average for the fast and slow averages. Defaults to an exponential moving average (ema / 1). |
| smoothingType | Type of moving average for the smoothing of the differences. Defaults to a simple moving average (sma / 0). |
The MACD has three outputs:
The primary value (
The signal value (
"Histogram" (so named because that's how it's usually drawn on a chart): the difference minus the smoothing of the difference.
In addition to the usual functions for getting the primary and signal values, the
| Parameter | Description |
| GetHistogramValue(idx) | Returns the histogram value at index |
| GetHistogramArray() | Returns an array of all the histogram values, similar to |