广告管理-1170PX*80PX
广告管理-770PX*90PX
当前位置:牛股网 > 牛股公式 >

把MACD神马版指标公式改成大智慧的

  • 牛股公式
  • 2020-09-05 17:04
  • 牛股网
广告管理-720PX*80PX

编写标准:

编写方式:网民求助:

请教师帮把MACD神马版指标公式改成大智慧的,感谢!

DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:EMA(DIFF,9);

MACD:2*(DIFF-DEA),COLORSTICK;

STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORGREEN;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORMAGENTA;

JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));

macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=1,21)=1;

STICKLINE(macd金叉,0,0.1,5,0),COLOR0000FF;

DRAWTEXT(macd金叉,-0.095,'macd金叉'),COLOR0000FF;

二macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(二macd金叉,0,0.15,5,0),COLORLIRED;

DRAWTEXT(二macd金叉,0.23,'二次macd金叉'),COLORLIRED;

三macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,28)=1;

STICKLINE(三macd金叉,0,0.2,5,0),COLORLIGREEN;

DRAWTEXT(三macd金叉,0.28,'三次macd金叉'),COLORLIGREEN;

四macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=4,28)=1;

STICKLINE(四macd金叉,0,0.25,5,0),COLORCYAN;

DRAWTEXT(四macd金叉,0.33,'四次macd金叉'),COLORCYAN;

五金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=5,33)=1;

STICKLINE(五金叉,0,0.3,5,0),COLORBLUE;

DRAWTEXT(五金叉,0.37,'五次macd金叉'),COLORBLUE;

六macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=6,33)=1;

STICKLINE(六macd金叉,0,0.35,5,0),COLORYELLOW;

DRAWTEXT(六macd金叉,0.0.7,'金子底'),COLORYELLOW;

DRAWTEXT(六macd金叉,0.42,'六次macd金叉'),COLORYELLOW;

七macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=7,33)=1;

STICKLINE(七macd金叉,0,0.4,5,0),COLORWHITE;

DRAWTEXT(七macd金叉,0.0.88,'铂金底'),COLORWHITE;

DRAWTEXT(七macd金叉,0.47,'七次macd金叉'),COLORWHITE;

八macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=8,33)=1;

STICKLINE(八macd金叉,0,0.5,5,0),COLORMAGENTA;

DRAWTEXT(八macd金叉,0.0.8,'钻石底'),COLORMAGENTA;

DRAWTEXT(八macd金叉,0.57,'八次macd金叉'),COLORMAGENTA;

九macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=9,33)=1;

STICKLINE(九macd金叉,0,0.55,5,0),COLORRED;

DRAWTEXT(九macd金叉,0.0.8,'晶钻底'),COLORRED;

DRAWTEXT(九macd金叉,0.6,'九次macd金叉'),COLORRED;

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

底背离:=(REF(L,A1 1)>L OR REF(C,A1 1)>C) AND (L,DIFF)>REF((L,DIFF),A1 1) AND CROSS(DIFF,DEA);

STICKLINE(底背离,0,-0.1,5,0),COLORRED;

DRAWTEXT(底背离,DEA,'底背离')COLORRED;

DRAWLINE(A1=0,DEA,底背离,DEA,0),COLOR0000FF,LINETHICK3;

A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));

顶背离:=(REF(C,A2 1)<C OR REF(H,A2 1)<H) AND REF((H,DIFF),A2 1)>(H,DIFF) AND CROSS(DEA,DIFF);

DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK3;

STICKLINE(顶背离,0,0.1,5,0),COLORGREEN;

DRAWTEXT(顶背离,DEA,'顶背离')COLORGREEN;

DRAWTEXT(CROSS(DIFF,DEA) AND 二macd金叉 AND 底背离,0.3,'三全底'),COLOR0000FF;

IF(DIFF>DEA,DIFF,DRAWNULL),COLORWHITE,LINETHICK2;

IF(DEA>REF(DEA,1) AND DIFF>DEA,DEA,DRAWNULL),COLORYELLOW,LINETHICK2;

解释以下:

DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:EMA(DIFF,9);

MACD:2*(DIFF-DEA),COLORSTICK;

STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0,0),COLORGREEN;

STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0,0),COLORMAGENTA;

JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));

macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=1,21)=1;

STICKLINE(macd金叉,0,0.1,5,0),COLOR0000FF;

DRAWTEXT(macd金叉,-0.095,'macd金叉'),COLOR0000FF;

二macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(二macd金叉,0,0.15,5,0),COLOR8977FF;

DRAWTEXT(二macd金叉,0.23,'二次macd金叉'),COLOR8977FF;

三macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,28)=1;

STICKLINE(三macd金叉,0,0.2,5,0),COLORGREEN;

DRAWTEXT(三macd金叉,0.28,'三次macd金叉'),COLORGREEN;

四macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=4,28)=1;

STICKLINE(四macd金叉,0,0.25,5,0),COLORCYAN;

DRAWTEXT(四macd金叉,0.33,'四次macd金叉'),COLORCYAN;

五金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=5,33)=1;

STICKLINE(五金叉,0,0.3,5,0),COLORBLUE;

DRAWTEXT(五金叉,0.37,'五次macd金叉'),COLORBLUE;

六macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=6,33)=1;

STICKLINE(六macd金叉,0,0.35,5,0),COLORYELLOW;

DRAWTEXT(六macd金叉,0.7,'金子底'),COLORYELLOW;

DRAWTEXT(六macd金叉,0.42,'六次macd金叉'),COLORYELLOW;

七macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=7,33)=1;

STICKLINE(七macd金叉,0,0.4,5,0),COLORWHITE;

DRAWTEXT(七macd金叉,0.88,'铂金底'),COLORWHITE;

DRAWTEXT(七macd金叉,0.47,'七次macd金叉'),COLORWHITE;

八macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=8,33)=1;

STICKLINE(八macd金叉,0,0.5,5,0),COLORMAGENTA;

DRAWTEXT(八macd金叉,0.8,'钻石底'),COLORMAGENTA;

DRAWTEXT(八macd金叉,0.57,'八次macd金叉'),COLORMAGENTA;

九macd金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=9,33)=1;

STICKLINE(九macd金叉,0,0.55,5,0),COLORRED;

DRAWTEXT(九macd金叉,0.8,'晶钻底'),COLORRED;

DRAWTEXT(九macd金叉,0.6,'九次macd金叉'),COLORRED;

A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

底背离:(REF(L,A1 1)>L OR REF(C,A1 1)>C) AND CROSS(DIFF,DEA);

STICKLINE(底背离,0,-0.1,5,0),COLORRED;

DRAWTEXT(底背离,DEA,'底背离'),COLORRED;

DRAWLINE(A1=0,DEA,底背离,DEA,0),COLOR0000FF,LINETHICK3;

A2:=BARSLAST(RE F(CROSS(DEA,DIFF),1));

顶背离:=(REF(C,A2+1)<C OR REF(H,A2+1)<H) AND CROSS(DEA,DIFF);

DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK3;

STICKLINE(顶背离,0,0.1,5,0),COLORGREEN;

DRAWTEXT(顶背离,DEA,'顶背离'),COLORGREEN;

DRAWTEXT(CROSS(DIFF,DEA) AND 二金叉 AND 底背离,0.3,'三全底'),COLOR0000FF;

PARTLINE(DIFF,DIFF>DEA,RGB(230,230,230)),LINETHICK2;

PARTLINE(DEA,DEA>REF(DEA,1) AND DIFF>DEA,RGB(235,250,0)),LINETHICK2;

广告管理-720PX*80PX

  • 关注微信

相关文章

微信公众号