MACD (Function)

image\trumpet2.gif Disclaimer

The MACD (Moving Average Convergence Divergence) series function returns the difference between a fast and slow exponential moving average based on the same Price.

Syntax

MACD(Price, FastLength, SlowLength)

Returns (Double)

A numeric value containing MACD for the current bar.

Parameters

Name

Type

Description

Price

Numeric

Specifies which bar value (price, function, or formula) to be considered.

FastLength

Numeric

Sets  the number of bars to consider for the fast average.

SlowLength

Numeric

Sets  the number of bars to consider for the slow average

Remarks

FastLength and SlowLength refer to the number of bars used in the moving averages. This should be a whole number that cannot change on a bar-by-bar basis. FastLength, by definition, should be less than SlowLength. If the specified length of FastLength is greater than that of the SlowLength, the oscillator will invert.

Example

Plot1(MACD(Close,16,26));

Reference

Gerald Appel, Signalert Corporation, 150 Great Neck Road, Great Neck, NY 11021