{多周期MACD}
背景色:DRAWGBK(C>0, RGB(0,0,0),RGB(0,0,10'該數(shù)值可以調(diào)整'),0,0,0);{淺色背景};
{周線MACD}
DIF周:(EMA(CLOSE,30)-EMA(CLOSE,90))*0.55,NODRAW,COLOR00FFFF;
DEA周:(EMA(DIF周,26))NODRAW,COLORGREEN;
MACD周:=(DIF周-DEA周)*2, COLORSTICK;
周線MACD走勢:DRAWBAND(DEA周,RGB(135,255,35),DIF周,RGB(240,160,0));
周線MACD:DRAWTEXT(CURRBARSCOUNT=1,DIF周,'--周MACD'),COLORRED;
{日線MACD}
DIF日:EMA(CLOSE,12)-EMA(CLOSE,26)NODRAW,COLORRED;
DEA日:EMA(DIF日,9)NODRAW,COLORLIBLUE;
日線MACD走勢:DRAWBAND(DIF日,RGB(255,80,120),DEA日,RGB(21,138,255));
日線MACD:DRAWTEXT(CURRBARSCOUNT=1,DIF日,'--日MACD'),COLOR00FFFF;
{60分鐘MACD}
DIF60:EMA(CLOSE,12/2)-EMA(CLOSE,26/2)NODRAW,COLORMAGENTA;
DEA60:EMA(DIF60,9/2)NODRAW,COLORGREEN;
MACD60分鐘走勢:DRAWBAND(DIF60,RGB(120,20,255),DEA60,RGB(80,255,20));
MACD60分鐘:DRAWTEXT(CURRBARSCOUNT=1,DIF60,'--60分鐘MACD'),COLORFF00FF;
{30分鐘MACD}
DIF30:(EMA(CLOSE,12/4)-EMA(CLOSE,26/4))NODRAW,COLORRED;
DEA30:(EMA(DIF30,9/4))NODRAW,COLORGREEN;
MACD30分鐘走勢:DRAWBAND(DIF30,RGB(220,50,50),DEA30,RGB(50,120,50));
MACD30分鐘:DRAWTEXT(CURRBARSCOUNT=1,DIF30,'--30分鐘MACD'),COLORGREEN;
{日MACD柱}
零軸:0,COLOR555555;
MACD:(DIF日-DEA日)*2,COLORRED,COLORSTICK; {COLORSTICK}
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,1),COLORRED,;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,1),COLOR4080FF,;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORYELLOW,;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,1,1),COLORLIGREEN,;
聯(lián)系客服