同花顺博弈公式
源码
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9),LINETHICK1,COLORFFFFFF;
MACD:=2*(DIF-DEA);
{QDIF:IF(DEA,DIF,0),colorred,LINETHICK2;}
QDIF:DIF,colorred,LINETHICK2;
D:=BACKSET(DIF=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLOR0000FF;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,0,0),COLORFFFF00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORFF99FF;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,0,0),COLORFFFF00;
金叉:=CROSS(DIF,DEA) AND DIF<0.3,COLOR0000FF;
DRAWICON((CROSS(DIF,DEA) AND DIF<0.3),0,4);