飞狐公式下载 飞狐KD+MACD副图源码(2)
2017-09-27 15:20 股票知识 zhishi.southmoney.com
STICKLINE(CDB,SH,MACDA,6,0),COLOR0000AA; {红色段}
STICKLINE(CDB,SH,MACDA,6.6,0),COLOR0011BB;
STICKLINE(CDB,SH,MACDA,4.4,0),COLOR0022CC;
STICKLINE(CDB,SH,MACDA,3.3,0),COLOR0033DD;
STICKLINE(CDB,SH,MACDA,2.2,0),COLOR0044EE;
STICKLINE(CDB,SH,MACDA,1.1,0),COLOR0055FF;
STICKLINE(CDC,SH,MACDA,6,0),COLORAA00BB;{向上粉红}
STICKLINE(CDC,SH,MACDA,6.6,0),COLORBB1177;
STICKLINE(CDC,SH,MACDA,4.4,0),COLORCC2299;
STICKLINE(CDC,SH,MACDA,3.3,0),COLORDD33AA;
STICKLINE(CDC,SH,MACDA,2.2,0),COLOREE44BB;
STICKLINE(CDC,SH,MACDA,1.1,0),COLORFF55BB;
STICKLINE(CDD,SH,MACDA,6,0),COLORFF7700;
STICKLINE(CDD,SH,MACDA,6.6,0),COLORAA7711;
STICKLINE(CDD,SH,MACDA,4.4,0),COLORCC9922;
STICKLINE(CDD,SH,MACDA,3.3,0),COLOREEBB33;
STICKLINE(CDD,SH,MACDA,2.2,0),COLORFFCC44;
STICKLINE(CDD,SH,MACDA,1.1,0),COLORFFDD55;
DRAWTEXT(BARSTATUS=2,SH,' 0'),COLOR00AAAA;
TYP:=(HIGH+LOW+CLOSE)/3;
STICKLINE(DIFF>REF(DIFF,1),20,20,2,0),COLORRED;
STICKLINE(DIFF<REF(DIFF,1),20,20,2,0),COLORGREEN;
STICKLINE(K>=REF(K,1) OR K>D AND DIFF>REF(DIFF,1),80,80,2,1),COLORRED;
STICKLINE(K<REF(K,1),80,80,2,1),COLORGREEN;
MACD金叉:=CROSS(MACD,DIFF) AND MACD>=(0-0.05) AND MACD<=0.02;
DRAWTEXT(MACD金叉,MACDA*0.82,'MACD金叉'),COLOR00FFFF;
XX:=EMA(MA(LOW,3)*0.96,30);
DIFF金叉:=IF(CROSS(DIFF,DEA) AND XX-REF(XX,1)>0 AND MACD>=REF(MACD,1) AND DIFF<=0,1,0);
DRAWTEXT(DIFF金叉=1,DIFFA*1.68,'DIFF金叉'),COLORCDFFBB;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
DRAWTEXT(低位金叉,DEAA*0.99,' 低位金叉'),COLOR0099DD;
DIFDEA:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(DIFDEA=2,21)=1;
DRAWTEXT(二次金叉,DEAA*0.99-8,' 二次金叉'),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
DRAWTEXT(底背离,DEAA*0.99-16,' 底背离'),COLOR0099FF;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(FILTER(顶背离,5),DEAA*1.02,'顶背离'),COLORDDAAAA;
{周金叉,死叉}(股票知识网zhishi.southmoney.com)
股票知识网声明:资讯来源于合作媒体及机构,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。