MACDSignal

Calculates the Signal line of the Moving Average Convergence Divergence indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
applyToSeries<Number>
close
-
signalPeriodNumber9-
fastPeriodNumber12-
slowPeriodNumber26-

Returns: Series<Number>

MACDSignal is a built-in function - you can use it directly. Below is an example implementation:

1 function MACDSignal(applyTo = close, signalPeriod = 9, fastPeriod = 12, slowPeriod = 26):
2 SMA(MACD(applyTo, fastPeriod, slowPeriod), signalPeriod)