Moving Average Convergence / Divergence (MACD)
MACD(Short Cycle, Long Cycle, Signal Periods, MA Type)
MACDSignal(Short Cycle, Long Cycle, Signal Periods, MA Type)
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.
Buy and sell interpretations may be derived from crossovers (calculated by the MACDSignal function), overbought / oversold levels of the MACD and divergences between MACD and underlying price.
Long Cycle: 26
Short Cycle: 13
Signal Periods: 9
MA Type: SIMPLE
SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
set BUY = CROSSOVER(A, B)
Evaluates to buy when the MACD Signal line recently crossed over the MACD.