Return value of the MACD line indicator over S and L period of selected price.
Syntax:
1 |
MACDLine[S,L,Si](price) |
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
i1 = MACD[12,26,9](close) i2 = MACDLine[12,26,9](close) if(i1<i2 AND i1[1]>i2[1]) THEN bullishSignal = 1 bearishSignal = 0 ELSIF (i1>i2 AND i1[1]<i2[1]) THEN bullishSignal = 0 bearishSignal = -1 ELSE bullishSignal = 0 bearishSignal = 0 ENDIF RETURN bullishSignal, bearishSignal |