飞狐六彩球MACD副图指标
源码
{六彩球MACD}
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORCCFFFF,LINETHICK2;
MACD1:=EMA(DIF,9);
DEF:2*(DIF-MACD1),COLORFFFF00,POINTDOT;
STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,4,1),COLORRED;
STICKLINE(DEF>=0 AND DEF< REF(DEF,1),0,DEF,4,0),COLORRED;
STICKLINE(DEF<0 AND DEF>=REF(DEF,1),0,DEF,4,1),COLORFFFF00;
STICKLINE(DEF<0 AND DEF< REF(DEF,1),0,DEF,4,0),COLORFFFF00;
缩头:IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),-0.03,0),COLOR00FF00,POINTDOT;
缩脚:IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),-0.04,0),COLORFF00FF,POINTDOT;
阻力:IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),-0.04,0),COLORBLUE,POINTDOT;
支撑:IF(CROSS(MA(C,20),C) OR CROSS(MA(C,60),C),-0.04,0),COLOR0099FF,POINTDOT;
做多:IF(CROSS(MACD1,DIF) AND DIF>0 AND MACD1>0,-0.04,0),COLORRED,POINTDOT;
跳空:IF(CROSS(DIF,MACD1) AND DIF<0 AND MACD1<0,-0.04,0),COLORYELLOW,POINTDOT;
MACD:EMA(DIF,9),COLORWHITE,LINETHICK2;
if(dif<0,dif,0),coloryellow,linethick2;
if(dif<0,0,dif),colorred,linethick2;
DRAWTEXT(FILTER(缩头,3) AND 缩头,-0.03,'●'),COLOR00FF00;
DRAWTEXT(FILTER(缩脚,3) AND 缩脚,-0.03,'●'),COLORFF00FF;
DRAWTEXT(FILTER(阻力,16) AND DEF>=0,-0.03,'●'),COLORBLUE;
DRAWTEXT(FILTER(支撑,16) AND DEF<0,-0.03,'●'),COLOR0099FF;
DRAWTEXT(CROSS(MACD1,DIF) AND DIF>0 AND MACD1>0,-0.03,'●'),COLORRED;
DRAWTEXT(CROSS(DIF,MACD1) AND DIF<0 AND MACD1<0,-0.03,'●'),COLORYELLOW;