您现在的位置:程序化交易>> 期货公式>> 博易大师>> 博易大师知识>>正文内容

请教高手通达信指标转换成博奕大师 [博易POBO]

咨询内容:

请教高手通达信指标转换成博奕大师

通达信代码如下:
DIFF:EMA(CLOSE,10)-EMA(CLOSE,26),NODRAW;
DEA:EMA(DIFF,9),NODRAW;MACD:(DIFF-DEA),NODRAW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
CURR:=CURRBARSCOUNT;
RM5:IF(CURR>3,REFX(DIFF,3),DRAWNULL),COLORRED;  
RM10:IF(CURR>3,REFX(DEA,3),DRAWNULL),COLORWHITE;  
ABSM5:=CONST(IF(DIFF-REF(DIFF,1)>0,ABS(DIFF-REF(DIFF,1)),0-ABS(DIFF-REF(DIFF,1))));  
 ABSM10:=CONST(IF(DEA-REF(DEA,1)>0,ABS(DEA-REF(DEA,1)),0-ABS(DEA-REF(DEA,1))));  
 R2M5:=IF(CURR=3,CONST(DIFF)+ABSM5,DRAWNULL);  
 R2M10:=IF(CURR=3,CONST(DEA)+ABSM10,DRAWNULL);  
 R1M5:=IF(CURR=2,CONST(DIFF)+2*ABSM5,DRAWNULL);  
 R1M10:=IF(CURR=2,CONST(DEA)+2*ABSM10,DRAWNULL);  
 R0M10:=IF(ISLASTBAR,CONST(DEA)+3*ABSM10,DRAWNULL);  
 DRAWLINE(CURR=4,RM5,CURR=3,R2M5,0),COLOR0000FF,DOTLINE;  
 DRAWLINE(CURR=4,RM10,CURR=3,R2M10,0),COLOR00FFFF,DOTLINE;  
 DRAWLINE(CURR=3,R2M10,CURR=2,R1M10,0),COLOR00FFFF,DOTLINE; 
 DRAWLINE(CURR=3,R2M5,CURR=2,R1M5,0),COLOR0000FF,DOTLINE;  
IF(RM5>RM10,RM5,DRAWNULL),COLORRED,LINETHICK2;
IF(RM5<RM10,RM5,DRAWNULL),COLORGREEN,LINETHICK2;
IF(RM5<0 AND RM5<RM10,RM5,DRAWNULL),COLORCC6600,LINETHICK2;
IF(RM5>0 AND RM5>RM10,RM5,DRAWNULL),LINETHICK2,COLORMAGENTA;
DRAWICON(CROSS(DIFF,0),0,1);
DRAWICON(CROSS(0,DIFF),0,2);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
0,COLORWHITE;
底背离:=(REF(L,A1+1)>L OR REF(C,A1+1)>C) AND (L,DIFF)>REF((L,DIFF),A1+1) AND CROSS(DIFF,DEA);
DRAWTEXT(底背离,DEA,'M底背');
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;
DRAWTEXT(顶背离,DEA,'M顶背')COLORGREEN;
DRAWNUMBER(C>0  AND ISLASTBAR,DEA*0.998,MACD);
 
效果图片如下,可以显示虚线

  1.png<!-- 咨询内容:

附件 :

-->

 

 来源:程序化99网( WWW.CXH99.COM )

博易技术人员: DIFF:EMA(CLOSE,10)-EMA(CLOSE,26),NODRAW;
DEA:EMA(DIFF,9),NODRAW;MACD:(DIFF-DEA),NODRAW;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
CURR:=DATACOUNT;
RM5:IF(CURR>3,REFX(DIFF,3),DRAWNULL),COLORRED;  
RM10:IF(CURR>3,REFX(DEA,3),DRAWNULL),COLORWHITE;  
ABSM5:=IF(DIFF-REF(DIFF,1)>0,ABS(DIFF-REF(DIFF,1)),0-ABS(DIFF-REF(DIFF,1)));  
 ABSM10:=IF(DEA-REF(DEA,1)>0,ABS(DEA-REF(DEA,1)),0-ABS(DEA-REF(DEA,1)));  
 R2M5:=IF(CURR=3,DIFF+ABSM5,DRAWNULL);  
 R2M10:=IF(CURR=3,DEA+ABSM10,DRAWNULL);  
 R1M5:=IF(CURR=2,DIFF+2*ABSM5,DRAWNULL);  
 R1M10:=IF(CURR=2,DEA+2*ABSM10,DRAWNULL);  
 R0M10:=IF(ISLASTBAR,DEA+3*ABSM10,DRAWNULL);  
 DRAWLINE(CURR=4,RM5,CURR=3,R2M5,0),COLOR0000FF,POINTDOT;  
 DRAWLINE(CURR=4,RM10,CURR=3,R2M10,0),COLOR00FFFF,POINTDOT;  
 DRAWLINE(CURR=3,R2M10,CURR=2,R1M10,0),COLOR00FFFF,POINTDOT; 
 DRAWLINE(CURR=3,R2M5,CURR=2,R1M5,0),COLOR0000FF,POINTDOT;  
AA1:IF(RM5>RM10,RM5,DRAWNULL),COLORRED,LINETHICK2;
AA2:IF(RM5<RM10,RM5,DRAWNULL),COLORGREEN,LINETHICK2;
AA3:IF(RM5<0 AND RM5<RM10,RM5,DRAWNULL),COLORCC6600,LINETHICK2;
AA4:IF(RM5>0 AND RM5>RM10,RM5,DRAWNULL),LINETHICK2,COLORMAGENTA;
DRAWICON(CROSS(DIFF,0),0,1);
DRAWICON(CROSS(0,DIFF),0,2);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=(REF(L,A1+1)>L OR REF(C,A1+1)>C) AND CROSS(DIFF,DEA);
DRAWTEXT(底背离,DEA,'M底背');
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 CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK3;
DRAWTEXT(顶背离,DEA,'M顶背'),COLORGREEN; 你好,好像显示不了虚线部份 来源 程序化久久网

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息或微信:cxhjy888 进行 有偿 编写!不贵!点击查看价格!


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容