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

请老师帮忙转换源码!!谢谢 [博易POBO]

咨询内容:

请老师帮忙转换源码!!谢谢

R1:=(CLOSE-LLV(LOW,90))/(HHV(HIGH,90)-LLV(LOW,90))*200;
R2:=EMA((CLOSE-(LLV(LOW,5)))/((HHV(HIGH,5))-(LLV(LOW,5)))*100,4)*2;
R3:=EMA(0.618*REF(R2,1)+0.382*R2,2);
R4:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
R5:=POW(MA(LOW,5),2)+MA(LOW,5);
R6:=POW(MA(HIGH,5),2)+MA(HIGH,5);
R7:=(R4-LLV(R5,64))/(HHV(R6,64)-LLV(R5,64))*150+65-10;
R8:=SMA((SMA(R7,3,1)*1.5-100),3,1);
R9:=3*(SMA(R7,3,1)*1.5-100)-2*R8;
R10:=(HIGH+LOW+CLOSE*2)/4;
R11:=(R10-(EMA(R10,13)))*100/(STD(R10,13));
R12:=EMA((EMA(R11,5)),13)+200-100;
R13:=(SMA(R1,3,1))+R2+(SMA(R7,3,1)*1.5-100)+R12;
R14:=(SMA((SMA(R1,3,1)),3,1))+R3+R8+(EMA(R12,10));
R15:=(3*(SMA(R1,3,1))-2*(SMA((SMA(R1,3,1)),3,1)))+(3*R12-2*(EMA(R12,10)))+
R9+(3*R12-2*(EMA(R12,10)));
R16:=(HIGH+LOW+CLOSE)/3;
R17:=(R16-MA(R16,34))/(0.015*AVEDEV(R16,34));
R18:=(HIGH+LOW+CLOSE+R16)/4;
R19:=(R18-(EMA(R18,24)))/(STD(R18,24))*100;
R20:=(R16-MA(R16,24))/(0.015*AVEDEV(R16,24));
R21:=(((EMA(R19,5))+R20+R17)/3+165)/4;
R22:=(R13+R14+R15*30)/32/5-15;
A1:=EMA(EMA(CLOSE,13),13);
A2:=(A1-REF(A1,1))/REF(A1,1)*6400;
A3:=100*WINNER(CLOSE*0.95);
AR1:=EMA(OPEN,7);
AR2:=EMA(AR1,21);
AR3:=CROSS(AR1,AR2);
AR5:=EMA(SMA((CLOSE-LLV(LOW,20))/(HHV(HIGH,16)-LLV(LOW,20))*100,8,1),3);
中买:IF(TROUGHBARS(C,18,1,1)=0 AND HIGH>LOW+0.1,30,0),COLORMAGENTA,LINETHICK6;
中卖:IF(PEAKBARS(L,15,1,1)=0,50,100),COLORRED,LINETHICK2;
全买:(ZIGZAG(C,35,1)>REF(ZIGZAG(C,35,1),1) AND REF(ZIGZAG(C,35,1),1)<REF(ZIGZAG(C,35,1),2))
*90,STICK,COLORRED,LINETHICK6;
全卖:(ZIGZAG(C,15,1)<REF(ZIGZAG(C,15,1),1) AND REF(ZIGZAG(C,15,1),1)>REF(ZIGZAG(C,15,1),2))
*90,STICK,COLORGREEN,LINETHICK7;
V1:=ZIGZAG(C,12,1);
V2:IF(REF(V1,2)>REF(V1,1) AND V1>REF(V1,1),20,0),COLORRED,LINETHICK2;
V3:IF(REF(V1,2)<REF(V1,1) AND V1<REF(V1,1),20,0),COLORGREEN,LINETHICK2;
VAR1:=ZIGZAG(C,12,1)<REF(ZIGZAG(C,12,1),1) AND REF(ZIGZAG(C,12,1),1)>REF(ZIGZAG(C,12,1),2);
VAR2:=ZIGZAG(C,12,1)>REF(ZIGZAG(C,12,1),1) AND REF(ZIGZAG(C,12,1),1)<REF(ZIGZAG(C,12,1),2);
DRAWTEXT(VAR1,40,'顶'),COLORYELLOW;
DRAWTEXT(VAR2,40,'底'),COLORBLUE; 
HH:=H;
LL:=L;
多止损:=REFX1(MA(LL,25),25/2)-(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*3.5,NODRAW,COLORYELLOW;
多止盈:=(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*1+REFX1(MA(HH,25),25/2),NODRAW,COLORWHITE;
空止损:=(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*3.5+REFX1(MA(HH,25),25/2),NODRAW,COLORYELLOW;
空止盈:=REFX1(MA(LL,25),25/2)-(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK3;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(短高H,90),COLORRED,LINETHICK1;
D90L:=EMA(短低L,90),COLORRED,LINETHICK1;
D90差:=D90H-D90L;
D90顶:=D90H+D90差*2,COLORRED,LINETHICK1;
D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*1+REFX1(MA(HH,25),25/2),LINETHICK1,COLORWHITE;
低0:=REFX1(MA(LL,25),25/2)-(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*1,LINETHICK1,COLORWHITE;
多头定位:=低0>=D90底 AND 高0>=D90顶;
空头定位:=高0<=D90顶 AND 低0<=D90底;
震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*2+REFX1(MA(HH,25),25/2),LINETHICK2,COLORGREEN;
短底:=REFX1(MA(LL,25),25/2)-(REFX1(MA(HH,25),25/2)-REFX1(MA(LL,25),25/2))*2,LINETHICK2,COLORGREEN;
短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线低盘:=(L-短底)/(短顶-短底)*100000,NODRAW,COLORRED;
顶1:=110000,COLORYELLOW,NODRAW;
底1:=-10000,COLORYELLOW,NODRAW;
震荡顶:=(REFX1(MA(短线高盘,25),25/2)-REFX1(MA(短线低盘,25),25/2))*1+REFX1(MA(短线高盘,25),25/2),POINTDOT,COLORWHITE;
震荡底:=REFX1(MA(短线低盘,25),25/2)-((REFX1(MA(短线高盘,25),25/2))-REFX1(MA(短线低盘,25),25/2))*1,POINTDOT,COLORWHITE;
做空:80000,COLORWHITE,LINETHICK1;
做多:20000,COLORWHITE,LINETHICK1;
空损:110000,COLORMAGENTA,LINETHICK2;
多损:-10000,COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,108000,'顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,80000,'卖'),COLORGREEN;
DRAWTEXT(ISLASTBAR,20000,'买'),COLORRED;
DRAWTEXT(ISLASTBAR,-9000,'底'),COLORMAGENTA;
DEA3:=EMA((EMA(CLOSE,3) - EMA(CLOSE,6)),9),COLORGREEN,LINETHICK2;
DEA3B:=REF(DEA3,1),COLORWHITE,NODRAW; 
DEA33B:=EMA((EMA(EMA(CLOSE,3) - EMA(CLOSE,9),3) - EMA(EMA(CLOSE,3) - EMA(CLOSE,9),9)),9),COLORWHITE,NODRAW;
DEA333B:=REF(DEA33B,1),COLORWHITE,NODRAW;
STICKLINE(DEA3B<DEA3 OR DEA333B<DEA33B,短线低盘,短线高盘,0.0,0),COLORRED; 
STICKLINE(DEA3B<DEA3 OR DEA333B<DEA33B,短线收盘,短线开盘,3,1),COLORRED;
STICKLINE(DEA3<DEA3B,短线低盘,短线高盘,0.0,0),COLORGREEN; 
STICKLINE(DEA3<DEA3B,短线收盘,短线开盘,3,1),COLORGREEN;
白色点多定位1:=短线低盘<做多 AND 短线高盘>做多;
白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE1(白色点多定位1=1,短线低盘,做多,3,0),COLORWHITE; 
STICKLINE1(白色点空定位1=1,短线高盘,做空,3,0),COLORWHITE; 
白色点多定位2:=短线高盘<做多;
白色点空定位2:=短线低盘>做空;
STICKLINE1(白色点多定位2=1,短线低盘,短线高盘,0.0,0),COLORWHITE; 
STICKLINE1(白色点多定位2=1,短线收盘,短线开盘,3,0),COLORWHITE;
STICKLINE1(白色点空定位2=1,短线低盘,短线高盘,0.0,0),COLORWHITE; 
STICKLINE1(白色点空定位2=1,短线收盘,短线开盘,3,0),COLORWHITE;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1;
震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,3);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,4);

 

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

博易技术人员: R1:=(CLOSE-LLV(LOW,90))/(HHV(HIGH,90)-LLV(LOW,90))*200;
R2:=EMA((CLOSE-(LLV(LOW,5)))/((HHV(HIGH,5))-(LLV(LOW,5)))*100,4)*2;
R3:=EMA(0.618*REF(R2,1)+0.382*R2,2);
R4:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
R5:=POW(MA(LOW,5),2)+MA(LOW,5);
R6:=POW(MA(HIGH,5),2)+MA(HIGH,5);
R7:=(R4-LLV(R5,64))/(HHV(R6,64)-LLV(R5,64))*150+65-10;
R8:=SMA((SMA(R7,3,1)*1.5-100),3,1);
R9:=3*(SMA(R7,3,1)*1.5-100)-2*R8;
R10:=(HIGH+LOW+CLOSE*2)/4;
R11:=(R10-(EMA(R10,13)))*100/(STD(R10,13));
R12:=EMA((EMA(R11,5)),13)+200-100;
R13:=(SMA(R1,3,1))+R2+(SMA(R7,3,1)*1.5-100)+R12;
R14:=(SMA((SMA(R1,3,1)),3,1))+R3+R8+(EMA(R12,10));
R15:=(3*(SMA(R1,3,1))-2*(SMA((SMA(R1,3,1)),3,1)))+(3*R12-2*(EMA(R12,10)))+
R9+(3*R12-2*(EMA(R12,10)));
R16:=(HIGH+LOW+CLOSE)/3;
R17:=(R16-MA(R16,34))/(0.015*AVEDEV(R16,34));
R18:=(HIGH+LOW+CLOSE+R16)/4;
R19:=(R18-(EMA(R18,24)))/(STD(R18,24))*100;
R20:=(R16-MA(R16,24))/(0.015*AVEDEV(R16,24));
R21:=(((EMA(R19,5))+R20+R17)/3+165)/4;
R22:=(R13+R14+R15*30)/32/5-15;
A1:=EMA(EMA(CLOSE,13),13);
A2:=(A1-REF(A1,1))/REF(A1,1)*6400;
A3:=100*WINNER(CLOSE*0.95);
AR1:=EMA(OPEN,7);
AR2:=EMA(AR1,21);
AR3:=CROSS(AR1,AR2);
AR5:=EMA(SMA((CLOSE-LLV(LOW,20))/(HHV(HIGH,16)-LLV(LOW,20))*100,8,1),3);
中买:IF(TROUGHBARS(C,18,1,1)=0 AND HIGH>LOW+0.1,30,0),COLORMAGENTA,LINETHICK6;
中卖:IF(PEAKBARS(L,15,1,1)=0,50,100),COLORRED,LINETHICK2;
全买:(ZIG(C,35,1)>REF(ZIG(C,35,1),1) AND REF(ZIG(C,35,1),1)<REF(ZIG(C,35,1),2))
*90,STICK,COLORRED,LINETHICK6;
全卖:(ZIG(C,15,1)<REF(ZIG(C,15,1),1) AND REF(ZIG(C,15,1),1)>REF(ZIG(C,15,1),2))
*90,STICK,COLORGREEN,LINETHICK7;
V1:=ZIG(C,12,1);
V2:IF(REF(V1,2)>REF(V1,1) AND V1>REF(V1,1),20,0),COLORRED,LINETHICK2;
V3:IF(REF(V1,2)<REF(V1,1) AND V1<REF(V1,1),20,0),COLORGREEN,LINETHICK2;
VAR1:=ZIG(C,12,1)<REF(ZIG(C,12,1),1) AND REF(ZIG(C,12,1),1)>REF(ZIG(C,12,1),2);
VAR2:=ZIG(C,12,1)>REF(ZIG(C,12,1),1) AND REF(ZIG(C,12,1),1)<REF(ZIG(C,12,1),2);
DRAWTEXT(VAR1,40,'顶'),COLORYELLOW;
DRAWTEXT(VAR2,40,'底'),COLORBLUE; 
HH:=H;
LL:=L;
多止损:=REFX(MA(LL,25),DATACOUNT-BARPOS-1)-(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*3.5,NODRAW,COLORYELLOW;
多止盈:=(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*1+REFX(MA(HH,25),DATACOUNT-BARPOS-1),NODRAW,COLORWHITE;
空止损:=(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*3.5+REFX(MA(HH,25),DATACOUNT-BARPOS-1),NODRAW,COLORYELLOW;
空止盈:=REFX(MA(LL,25),DATACOUNT-BARPOS-1)-(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*1,NODRAW,COLORWHITE;
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK3;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(短高H,90),COLORRED,LINETHICK1;
D90L:=EMA(短低L,90),COLORRED,LINETHICK1;
D90差:=D90H-D90L;
D90顶:=D90H+D90差*2,COLORRED,LINETHICK1;
D90底:=D90L-D90差*2,COLORRED,LINETHICK1;
高0:=(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*1+REFX(MA(HH,25),DATACOUNT-BARPOS-1),LINETHICK1,COLORWHITE;
低0:=REFX(MA(LL,25),DATACOUNT-BARPOS-1)-(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*1,LINETHICK1,COLORWHITE;
多头定位:=低0>=D90底 AND 高0>=D90顶;
空头定位:=高0<=D90顶 AND 低0<=D90底;
震荡定位:=低0>=D90底 AND 高0<=D90顶;
短顶:=(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*2+REFX(MA(HH,25),DATACOUNT-BARPOS-1),LINETHICK2,COLORGREEN;
短底:=REFX(MA(LL,25),DATACOUNT-BARPOS-1)-(REFX(MA(HH,25),DATACOUNT-BARPOS-1)-REFX(MA(LL,25),DATACOUNT-BARPOS-1))*2,LINETHICK2,COLORGREEN;
短线收盘:=(C-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线开盘:=(O-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线高盘:=(H-短底)/(短顶-短底)*100000,LINETHICK2,COLORRED;
短线低盘:=(L-短底)/(短顶-短底)*100000,NODRAW,COLORRED;
顶1:=110000,COLORYELLOW,NODRAW;
底1:=-10000,COLORYELLOW,NODRAW;
震荡顶:=(REFX(MA(短线高盘,25),DATACOUNT-BARPOS-1)-REFX(MA(短线低盘,25),DATACOUNT-BARPOS-1))*1+REFX(MA(短线高盘,25),DATACOUNT-BARPOS-1),POINTDOT,COLORWHITE;
震荡底:=REFX(MA(短线低盘,25),DATACOUNT-BARPOS-1)-((REFX(MA(短线高盘,25),DATACOUNT-BARPOS-1))-REFX(MA(短线低盘,25),DATACOUNT-BARPOS-1))*1,POINTDOT,COLORWHITE;
做空:80000,COLORWHITE,LINETHICK1;
做多:20000,COLORWHITE,LINETHICK1;
空损:110000,COLORMAGENTA,LINETHICK2;
多损:-10000,COLORMAGENTA,LINETHICK2;
DRAWTEXT(ISLASTBAR,108000,'顶'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,80000,'卖'),COLORGREEN;
DRAWTEXT(ISLASTBAR,20000,'买'),COLORRED;
DRAWTEXT(ISLASTBAR,-9000,'底'),COLORMAGENTA;
DEA3:=EMA((EMA(CLOSE,3) - EMA(CLOSE,6)),9),COLORGREEN,LINETHICK2;
DEA3B:=REF(DEA3,1),COLORWHITE,NODRAW; 
DEA33B:=EMA((EMA(EMA(CLOSE,3) - EMA(CLOSE,9),3) - EMA(EMA(CLOSE,3) - EMA(CLOSE,9),9)),9),COLORWHITE,NODRAW;
DEA333B:=REF(DEA33B,1),COLORWHITE,NODRAW;
STICKLINE(DEA3B<DEA3 OR DEA333B<DEA33B,短线低盘,短线高盘,0.0,0),COLORRED; 
STICKLINE(DEA3B<DEA3 OR DEA333B<DEA33B,短线收盘,短线开盘,3,1),COLORRED;
STICKLINE(DEA3<DEA3B,短线低盘,短线高盘,0.0,0),COLORGREEN; 
STICKLINE(DEA3<DEA3B,短线收盘,短线开盘,3,1),COLORGREEN;
白色点多定位1:=短线低盘<做多 AND 短线高盘>做多;
白色点空定位1:=短线高盘>做空 AND 短线低盘<做空;
STICKLINE(白色点多定位1=1,短线低盘,做多,3,0),COLORWHITE; 
STICKLINE(白色点空定位1=1,短线高盘,做空,3,0),COLORWHITE; 
白色点多定位2:=短线高盘<做多;
白色点空定位2:=短线低盘>做空;
STICKLINE(白色点多定位2=1,短线低盘,短线高盘,0.0,0),COLORWHITE; 
STICKLINE(白色点多定位2=1,短线收盘,短线开盘,3,0),COLORWHITE;
STICKLINE(白色点空定位2=1,短线低盘,短线高盘,0.0,0),COLORWHITE; 
STICKLINE(白色点空定位2=1,短线收盘,短线开盘,3,0),COLORWHITE;
多头多定位:=CROSS(做多,短线低盘) AND 多头定位=1;
多头平定位:=CROSS(短线高盘,做空) AND 多头定位=1 AND 震荡定位=0;
空头空定位:=CROSS(短线高盘,做空) AND 空头定位=1;
空头平定位:=CROSS(做多,短线低盘) AND 空头定位=1 AND 震荡定位=0;
震荡多定位:=CROSS(做多,短线低盘) AND 震荡定位=1;
震荡空定位:=CROSS(短线高盘,做空) AND 震荡定位=1;
DRAWICON(多头多定位=1 OR 震荡多定位=1,短线低盘,3);
DRAWICON(空头空定位=1 OR 震荡空定位=1,短线高盘,4); 来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容