DIFF := EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorgreen; DEA := EMA(DIFF,M),colorred;
MACD := 2*(DIFF-DEA),NODRAW;
MACDHS:=IF(MACD>0 AND MACD>REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDLX:=IF(MACD<0 AND MACD<REF(MACD,1),MACD,0);
MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);
STICKLINE(MACDHS>0,0,MACD,N,0),colorred;
STICKLINE(MACDHX>0,0,MACD,N,0),colorgreen;
STICKLINE(MACDLX<0,MACD,0,N,0),colorblue;
STICKLINE(MACDLS<0,MACD,0,N,0),colorlired;
|
