大智慧L2的源码
DIFF:(EMA(CLOSE,5)-EMA(CLOSE,20))*100;
DEA:EMA(DIFF,5);
ZZ:=CROSS(DEA,DIFF);
DRAWICON(ZZ,DEA,2);
ZZ1:=CROSS(DIFF,DEA);
DRAWICON(ZZ1,DIFF,1);
DIFF0:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEA0:=EMA(DIFF0,9);
MACD:2*(DIFF0-DEA0);
STICKLINE(MACD>0,0,MACD,0.00001,0),COLORRED;
DIFF2:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEA2:=EMA(DIFF2,9);
MACD1:2*(DIFF2-DEA2);
STICKLINE(MACD1<0,0,MACD1,0.00001,0),COLORBLUE;
SQX:=(C-MA(CLOSE,13))*100;
DIFF7:=EMA(MA(SQX,7),1);
DEA1:=EMA(DIFF7,7);
MACD0:(DIFF7-DEA1)*2,COLORSTICK;
低位金叉:IF(CROSS(DIFF7,DEA1) AND DIFF7<-0.1,0.3,0),COLORYELLOW,POINTDOT;
STICKLINE(低位金叉,0,15,4,0),COLORYELLOW;
DRAWICON(低位金叉,0.3,1);
JCCOUNT:=COUNT(CROSS(DIFF7,DEA1),BARSLAST(DEA1>=0));
二次金叉:IF(CROSS(DIFF7,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;
STICKLINE(二次金叉,30,15,4,0),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF7,DEA1),1));
底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIFF7>REF(DIFF7,A1+1) AND CROSS(DIFF7,DEA1),0.1,0),COLORRED,POINTDOT;
STICKLINE(底背离,45,30,4,0),COLORRED;
{DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORRED;}
A2:=BARSLAST(REF(CROSS(DEA1,DIFF7),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIFF7,A2+1)>DIFF7 AND CROSS(DEA1,DIFF7),COLORGREEN;
DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORGREEN;
A3:=CROSS(DIFF7,DEA1) AND DEA1<0;
零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;
STICKLINE(零下二次金叉,45,60,4,0),COLORWHITE;
飞狐源码
短线极品:自改的macd
本人对macd情有独钟,现对其加以修改,使其长短皆宜,其中奥妙各位慢慢体会,觉得好的话顶起来!
DIFF:(EMA(DCLOSE,5)-EMA(DCLOSE,20))*100;
DEA:EMA(DIFF,5);
ZZ:=CROSS(DEA,DIFF);
DRAWICON(ZZ,DEA,2);
ZZ1:=CROSS(DIFF,DEA);
DRAWICON(ZZ1,DIFF,1);
DIFF0:=(EMA(DCLOSE,12)-EMA(DCLOSE,26))*100;
DEA0:=EMA(DIFF0,9);
MACD:2*(DIFF0-DEA0),NODRAW;
STICKLINE(MACD>0,0,MACD,0.00001,0),COLORRED;
DIFF2:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;
DEA2:=EMA(DIFF2,9);
MACD1:2*(DIFF2-DEA2),NODRAW;
STICKLINE(MACD1<0,0,MACD1,0.00001,0),COLORLIBLUE;
SQX:=(C-MA(CLOSE,13))*100;
DIFF7:=EMA(MA(SQX,7),1);
DEA1:=EMA(DIFF7,7);
MACD0:=(DIFF7-DEA1)*2,COLORSTICK;
低位金叉:=IF(CROSS(DIFF7,DEA1) AND DIFF7<-0.1,0.3,0),COLORYELLOW,POINTDOT;
STICKLINE(低位金叉,0,15,4,0),COLORYELLOW;
DRAWICON(低位金叉,0.3,1);
JCCOUNT:=COUNT(CROSS(DIFF7,DEA1),BARSLAST(DEA1>=0));
二次金叉:=IF(CROSS(DIFF7,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;
STICKLINE(二次金叉,30,15,4,0),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIFF7,DEA1),1));
底背离:=IF(REF(CLOSE,A1+1)>CLOSE AND DIFF7>REF(DIFF7,A1+1) AND CROSS(DIFF7,DEA1),0.1,0),COLORRED,POINTDOT;
STICKLINE(底背离,45,30,4,0),COLORRED;
{DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORRED;}
A2:=BARSLAST(REF(CROSS(DEA1,DIFF7),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF7,A2+1)>DIFF7 AND CROSS(DEA1,DIFF7),COLORGREEN;
DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORGREEN;
A3:=CROSS(DIFF7,DEA1) AND DEA1<0;
零下二次金叉:=IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT;
STICKLINE(零下二次金叉,45,60,4,0),COLORWHITE; |