VAR1:=1;
DIF:EMA(CLOSE,12)*VAR1 - EMA(CLOSE,26),COLOR33FF33,LINETHICK2;
DEA:EMA(DIF,9)*VAR1,COLORYELLOW,LINETHICK2;
MACD:2*(DIF-DEA)*VAR1,COLORSTICK;
DRAWBAND(DIF,RGB(158,50,50),DEA,RGB(83,123,68));
短线只做红柱柱:DIF>DEA AND MACD>REF(MACD,1),COLORRED,NODRAW;
中线只做暖色带:MACD=0,COLORCC66FF;
持股线:=EMA(C,13),COLORMAGENTA;
VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(VAR11,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
STICKLINE(MACD>0,0,MACD,1,1),COLORRED;
STICKLINE(MACD>0 AND MACD< REF(MACD,1),0,MACD,1,1),COLORFFFF00;
STICKLINE(MACD< 0,0,MACD,1,1),COLORBROWN;
STICKLINE(MACD< 0 AND MACD>REF(MACD,1),0,MACD,1,1),COLORFF00FF;
IF(DIF< REF(DIF,1),DIF,DRAWNULL),COLORGRAY,LINETHICK0;
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORMAGENTA,LINETHICK3;
DRAWICON(CROSS(DIF,DEA) ,DEA,5);
DRAWICON(CROSS(DEA,DIF),DIF,6);
DRAWICON(CROSS(DIF,0),DEA,9);
F分析家公式网:=CROSS(DIF,DEA);
卖出:=CROSS(DEA,DIF);
DRAWTEXT(F分析家公式网 AND C>0,DIF+0.02,'买'),COLORWHITE;
DRAWTEXT(卖出,DEA+0.02,'卖'),COLORYELLOW;