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

麻烦老师帮忙改下,非常感谢! [博易POBO]

咨询内容:

麻烦老师帮忙改下,非常感谢!

DIFF:=EMA(CLOSE,21)-EMA(CLOSE,34);
DEAA:=EMA(DIFF,8);
MACDD:=8*(DIFF-DEAA);
MARDD:=SMA(MACDD,2,1);
STICKLINE(MACDD>MARDD,MACDD,MARDD,1.8,0),COLOR0000FF;
STICKLINE(MACDD<MARDD,MACDD,MARDD,1.8,0),COLOR008000;
MACD2:=2*("MACD.DIF"-"MACD.DEA");
STICKLINE(MACD2>=0,0,MACD2,0.5,0),COLORYELLOW;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.5,0),COLORLIBLUE;
STICKLINE(MACD2<0,0,MACD2,0.5,0),COLORLIBLUE;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.5,0),COLORYELLOW;
DIF:DEA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;
DEA:EMA(DIF,9),COLORBLUE,LINETHICK2;
DRAWTEXT(ISLASTBAR,DIF,'←DIF'),COLORRED;
DRAWTEXT(ISLASTBAR,DEA,'←DEA'),COLORBLUE;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*0.5,41);
DRAWTEXT(二次金叉,DEA*0.5,'二次金叉'),COLORWHITE;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
DRAWTEXT(底背离,DIF*1,'底背离'),COLORRED;
DRAWICON(底背离,DIF*1,38);
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(顶背离,DIF*1,'顶背离'),COLORLIBLUE;
DRAWICON(顶背离,DIF*1,39);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:SMA(RSV,9,3),NODRAW;
D:=SMA(K,9,3)NODRAW;
J:3*K-2*D,NODRAW;
A:=CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(J,D);
DRAWICON(A,DEA*1.2,25);
DRAWTEXT(A,DEA*1.2,'MACD&KDJ 共振'),COLORWHITE;

 

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

博易技术人员: DIFF:=EMA(CLOSE,21)-EMA(CLOSE,34);
DEAA:=EMA(DIFF,8);
MACDD:=8*(DIFF-DEAA);
MARDD:=SMA(MACDD,2,1);
STICKLINE(MACDD>MARDD,MACDD,MARDD,1.8,0),COLOR0000FF;
STICKLINE(MACDD<MARDD,MACDD,MARDD,1.8,0),COLOR008000;
MACD2:=2*(DIFF-MACDD);
STICKLINE(MACD2>=0,0,MACD2,0.5,0),COLORYELLOW;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.5,0),COLORBLUE;
STICKLINE(MACD2<0,0,MACD2,0.5,0),COLORBLUE;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.5,0),COLORYELLOW;
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;
DEA:EMA(DIF,9),COLORBLUE,LINETHICK2;
DRAWTEXT(ISLASTBAR,DIF,'←DIF'),COLORRED;
DRAWTEXT(ISLASTBAR,DEA,'←DEA'),COLORBLUE;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*0.5,41);
DRAWTEXT(二次金叉,DEA*0.5,'二次金叉'),COLORWHITE;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
DRAWTEXT(底背离,DIF*1,'底背离'),COLORRED;
DRAWICON(底背离,DIF*1,38);
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(顶背离,DIF*1,'顶背离'),COLORBLUE;
DRAWICON(顶背离,DIF*1,39);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:SMA(RSV,9,3),NODRAW;
D:=SMA(K,9,3),NODRAW;
J:3*K-2*D,NODRAW;
A:=CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(J,D);
DRAWICON(A,DEA*1.2,25);
DRAWTEXT(A,DEA*1.2,'MACD&KDJ 共振'),COLORWHITE; 来源 程序化久久网

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


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

相关文章

    没有相关内容