Glossary Item Box

TradeScript Help

Moving Average Convergence - Divergence (MACD)

MACD(Short Cycle, Long Cycle, Signal Periods, MA Type)

MACDSignal(Short Cycle, Long Cycle, Signal Periods, MA Type)

Overview

The MACD is a moving average oscillator that shows potential overbought/oversold phases of market fluctuation. The MACD is a calculation of two moving averages of the underlying price/indicator.

Interpretation

Buy and sell interpretations may be derived from crossover (calculated by the MACDSignal function), overbought / oversold levels of the MACD and divergence between MACD and underlying price.

Recommended Parameters

Long Cycle: 26

Short Cycle: 13

Signal Periods: 9

MA Type: SIMPLE

Example

SET A = MACDSignal(13, 26, 9, SIMPLE)

SET B = MACD(13, 26, 9, SIMPLE)

CROSSOVER(A, B) = TRUE

Evaluates to true when the MACD Signal line recently crossed over the MACD.