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

老师,请你帮忙改一指标改成博易大师的 [博易POBO]

咨询内容:

老师,请你帮忙改一指标改成博易大师的

AA:=(C*2+H+L+O)/5;
A0:=MA(C,5);
支撑线:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,13)+MA(CLOSE,21))/4,COLORYELLOW;
次趋势线:(EMA(AA,13)+MA(AA,25)+MA(AA,55)+MA(AA,120))/4,COLORMAGENTA;
主趋势线:(EMA(AA,90)+MA(AA,120)+MA(AA,249))/3,RGB(0,255,64),LINETHICK1; 
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),NODRAW;
JC:=CROSS(DIFF,DEA);
SC:=CROSSDOWN(DIFF,DEA);
N1:=BARSLAST(JC)+1;
N2:=BARSLAST(SC)+1;


HH:=VALUEWHEN(CROSSDOWN(DIFF,DEA),HHV(H,N1));//上次MACD红柱期间合约最大值
HH2:=VALUEWHEN(CROSSDOWN(DIFF,DEA),REF(HH,1));//上上次MACD红柱期间合约最大值
MHD:=VALUEWHEN(CROSSDOWN(DIFF,DEA),HHV(MACD,N1));//上次MACD红柱期间MACD最大值
MHD2:=VALUEWHEN(CROSSDOWN(DIFF,DEA),REF(MHD,1));//上上次MACD红柱期间MACD最大值


LL:=VALUEWHEN(CROSS(DIFF,DEA),LLV(L,N2));
LL2:=VALUEWHEN(CROSS(DIFF,DEA),REF(LL,1));
MLD:=VALUEWHEN(CROSS(DIFF,DEA),LLV(MACD,N2));
MLD2:=VALUEWHEN(CROSS(DIFF,DEA),REF(MLD,1));


A:=MACD<0&&HH>HH2&&MHD<MHD2;//顶背离
B:=MACD>0&&LL<LL2&&MLD>MLD2;


A1:=BACKSET(A,HHVBARS(MACD,N1)+1);
A2:=BACKSET(A,HHVBARS(MACD,SUMBARS(JC,2))+1);
B1:=BACKSET(B,LLVBARS(MACD,N2)+1);
B2:=BACKSET(B,LLVBARS(MACD,SUMBARS(SC,2))+1);


DRAWTEXT(CROSS(A1,0.5),MACD,'顶背离'),VALIGN2,COLORRED;
DRAWTEXT(CROSS(B1,0.5),MACD,'底背离'),VALIGN0,COLORGREEN;
STICKLINE(MACD>0&&MACD>REF(MACD,1),0,MACD,COLORRED,0);
STICKLINE(MACD>0&&MACD<REF(MACD,1),0,MACD,COLORYELLOW,0);
STICKLINE(MACD<0&&MACD>REF(MACD,1),0,MACD,COLORGREEN,0);
STICKLINE(MACD<0&&MACD<REF(MACD,1),0,MACD,COLORBLUE,0);
DRAWCOLORKLINE(CROSS(A1,0.5),COLORYELLOW,0);
DRAWCOLORKLINE(CROSS(B1,0.5),COLORGREEN,0);
 

 

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

博易技术人员: AA:=(C*2+H+L+O)/5;
A0:=MA(C,5);
支撑线:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,13)+MA(CLOSE,21))/4,COLORYELLOW;
次趋势线:=(EMA(AA,13)+MA(AA,25)+MA(AA,55)+MA(AA,120))/4,COLORMAGENTA;
主趋势线:=(EMA(AA,90)+MA(AA,120)+MA(AA,249))/3,COLOR0040FF,LINETHICK1; 
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA),NODRAW;
JC:=CROSS(DIFF,DEA);
SC:=CROSS(DEA,DIFF);
N1:=BARSLAST(JC)+1;
N2:=BARSLAST(SC)+1;


HH:=VALUEWHEN(CROSS(DEA,DIFF),HHV(H,N1));//上次MACD红柱期间合约最大值
HH2:=VALUEWHEN(CROSS(DEA,DIFF),REF(HH,1));//上上次MACD红柱期间合约最大值
MHD:=VALUEWHEN(CROSS(DEA,DIFF),HHV(MACD,N1));//上次MACD红柱期间MACD最大值
MHD2:=VALUEWHEN(CROSS(DEA,DIFF),REF(MHD,1));//上上次MACD红柱期间MACD最大值


LL:=VALUEWHEN(CROSS(DIFF,DEA),LLV(L,N2));
LL2:=VALUEWHEN(CROSS(DIFF,DEA),REF(LL,1));
MLD:=VALUEWHEN(CROSS(DIFF,DEA),LLV(MACD,N2));
MLD2:=VALUEWHEN(CROSS(DIFF,DEA),REF(MLD,1));


A:=MACD<0&&HH>HH2&&MHD<MHD2;//顶背离
B:=MACD>0&&LL<LL2&&MLD>MLD2;


A1:=BACKSET(A,HHVBARS(MACD,N1)+1);
A2:=BACKSET(A,HHVBARS(MACD,SUMBARS(JC,2))+1);
B1:=BACKSET(B,LLVBARS(MACD,N2)+1);
B2:=BACKSET(B,LLVBARS(MACD,SUMBARS(SC,2))+1);


DRAWTEXT(CROSS(A1,0.5),MACD,'顶背离'),VALIGN2,COLORRED;
DRAWTEXT(CROSS(B1,0.5),MACD,'底背离'),VALIGN0,COLORGREEN;
STICKLINE(MACD>0&&MACD>REF(MACD,1),0,MACD,5,0),COLORRED;
STICKLINE(MACD>0&&MACD<REF(MACD,1),0,MACD,5,0),COLORYELLOW;
STICKLINE(MACD<0&&MACD>REF(MACD,1),0,MACD,5,0),COLORGREEN;
STICKLINE(MACD<0&&MACD<REF(MACD,1),0,MACD,5,0),COLORBLUE;
STICKLINE(CROSS(A1,0.5),0,MACD,5,0),COLORYELLOW;
STICKLINE(CROSS(B1,0.5),0,MACD,5,0),COLORGREEN; 老师主图用不了啊谢谢 来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容