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

请大师修改 [博易POBO]

咨询内容:

请大师修改

G:=HHV(HIGH,3);
N:=LLV(LOW,3);
H10:=IF(H<REF(H,1)&&H<REF(H,2)&&H<REF(H,4)&&L<REF(L,1)&&L<REF(L,3)&&L<REF(L,5)&&OPEN>CLOSE&&(HHV(OPEN,0)-CLOSE)>0,REF(H,4),0);
L10:=IF(L>REF(L,1)&&L>REF(L,3)&&L>REF(L,5)&&H>REF(H,1)&&H>REF(H,2)&&H>REF(H,4)&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,0))>0,REF(L,4),0);
H20:=VALUEWHEN(H10>0,H10);
L20:=VALUEWHEN(L10>0,L10);
K1:=IF(C>H20,-3,IF(C<L20,1,0));
K2:=VALUEWHEN(K1<>0,K1);
GG:=IF(K2=1,H20,L20);
GG1:=VALUEWHEN(ISLASTBAR,GG);
DRAWNUMBER(L>0,GG1,GG1,0,COLORCYAN);
TMP:=K2;
W1:=K2;
W2:=OPEN-CLOSE;


HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN<CLOSE,OPEN,CLOSE);
DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN);
DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN);
DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED);
DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED);
STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1);
STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1);
STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0);
STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0);
DRAWTEXT(CROSS(TMP,0),H,'卖');
DRAWTEXT(CROSS(0,TMP),L,'买');
DRAWNUMBER(CROSS(TMP,0),G,G,2,COLORGREEN);
DRAWNUMBER(CROSS(0,TMP),N,N,2,COLORYELLOW),ALIGN0;


D1过滤:=FILTER(BACKSET(FILTER(REF(H,5)=HHV(H,2*5+1),5),5+1),5);
D2过滤:=FILTER(BACKSET(FILTER(REF(L,5)=LLV(L,2*5+1),5),5+1),5);
H1过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1过滤:=D2过滤 AND NOT((D1过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2<(H+L)/2));
H2过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2));
F1过滤:=BACKSET(H1过滤 AND COUNT(L1过滤,REF(BARSLAST(H1过滤),1)+1)>0,LLVBARS(L,REF(BARSLAST(H1过滤),1)+1)+1);
LD过滤:=BACKSET(F1过滤>REF(F1过滤,1),1)>REF(BACKSET(F1过滤>REF(F1过滤,1),1),1);
L2过滤:=LD过滤 OR ISLASTBAR OR BARSCOUNT(C)=1;
F2过滤:=BACKSET(L2过滤 AND COUNT(H2过滤,REF(BARSLAST(L2过滤),1)+1)>0,HHVBARS(H,REF(BARSLAST(L2过滤),1)+1)+1);
HD过滤:=BACKSET(F2过滤>REF(F2过滤,1),1)>REF(BACKSET(F2过滤>REF(F2过滤,1),1),1);
HH过滤:=HD过滤&&NOT(LD过滤)&&REFX1(BACKSET(HD过滤&&H>HV(H,BARSLAST(LD过滤)),BARSLAST(LD过滤))<>1,1);
LL过滤:=LD过滤&&NOT(HD过滤)&&REFX1(BACKSET(LD过滤&&L<LV(L,BARSLAST(HD过滤)),BARSLAST(HD过滤))<>1,1);
AA:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,2));
BB:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,2));
CC:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤))-REF(H,SUMBARS(HH过滤=1,2)),REF(H,BARSLAST(HH过滤))-REF(L,SUMBARS(LL过滤=1,2)));
DD:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤)),REF(H,BARSLAST(HH过滤)));

//DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED,LINETHICK3;
//DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED,LINETHICK3;
//DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN,LINETHICK3;
//DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN,LINETHICK3;
SS:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,1));
QQ:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,1));
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,1);
DRAWCOLORKLINE(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),COLORRED,0);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,1);
DRAWCOLORKLINE(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),COLORGREEN,0);
做多:IF(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),0.5),L),NULL),COLORCC33FF,LINETHICK4;
做空:IF(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),0.5),H),NULL),COLORFFFFFF,LINETHICK4;
DRAWTEXT(ISLASTBAR,做多,'做多'),COLORFFFFFF,FONTSIZE25,ALIGN2;
DRAWTEXT(ISLASTBAR,做空,'做空'),COLORFFFFFF,FONTSIZE25,ALIGN2;


DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF(G,1),COLORFF8000),LINETHICK3;
DRAWLINE(TMP=-3&&REF(TMP,1)=-3,N,TMP=-3&&REF(TMP,1)=-3,REF(N,1),COLOR990099),LINETHICK3;
DRAWSL(K2=1,G,0,1,0,COLORFF8000),LINETHICK3;
DRAWSL(K2=-3,N,0,1,0,COLOR990099),LINETHICK3;
Q:=BARSLAST(CROSS(K2,0))+1;
W:=BARSLAST(CROSSDOWN(K2,0))+1;
DRAWSL(CROSS(K2,0),HHV(H,W),0,-HHVBARS(H,W),0,COLORFF8000),LINETHICK3;
DRAWSL(CROSSDOWN(K2,0),LLV(L,Q),0,-LLVBARS(L,Q),0,COLOR990099),LINETHICK3;
DRAWLINE(CROSS(K2,0)&&K2=1,G,CROSS(K2,0)&&K2=1,HHV(H,W),COLORFF8000),LINETHICK3;
DRAWLINE(CROSSDOWN(K2,0)&&K2=-3,G,CROSSDOWN(K2,0)&&K2=-3,LLV(L,Q),COLOR990099),LINETHICK3;

HH01:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),HHV(H,2),0);
LL01:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),LLV(L,2),0);
HH02:=VALUEWHEN(HH01>0,HH01);
LL02:=VALUEWHEN(LL01>0,LL01);
K01:=IF(CLOSE>HH02,-3,IF(CLOSE<LL02,1,0));
K02:=VALUEWHEN(K01<>0,K01);
DRAWTEXT(CROSS(K02,0),REF(H,3),'顶'),COLORGREEN,FONTSIZE20,ALIGN2;
DRAWTEXT(CROSS(0,K02),REF(L,2),'底'),COLORYELLOW,VALIGN0,FONTSIZE20,ALIGN2;






A:=BACKSET(ISLASTBAR,DAYBARPOS);
IF(A,REF(HHV(H,DAYBARPOS),DAYBARPOS),NULL);
IF(A,REF(LLV(L,DAYBARPOS),DAYBARPOS),NULL);
DRAWTEXT(ISLASTBAR,REF(HHV(H,DAYBARPOS),DAYBARPOS),'昨天最高价');
DRAWTEXT(ISLASTBAR,REF(LLV(L,DAYBARPOS),DAYBARPOS),'昨天最低价');

 

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

博易技术人员: G:=HHV(HIGH,3);
N:=LLV(LOW,3);
H10:=IF(H<REF(H,1)&&H<REF(H,2)&&H<REF(H,4)&&L<REF(L,1)&&L<REF(L,3)&&L<REF(L,5)&&OPEN>CLOSE&&(HHV(OPEN,0)-CLOSE)>0,REF(H,4),0);
L10:=IF(L>REF(L,1)&&L>REF(L,3)&&L>REF(L,5)&&H>REF(H,1)&&H>REF(H,2)&&H>REF(H,4)&&OPEN<CLOSE&&(CLOSE-LLV(OPEN,0))>0,REF(L,4),0);
H20:=VALUEWHEN(H10>0,H10);
L20:=VALUEWHEN(L10>0,L10);
K1:=IF(C>H20,-3,IF(C<L20,1,0));
K2:=VALUEWHEN(K1<>0,K1);
GG:=IF(K2=1,H20,L20);
GG1:=VALUEWHEN(ISLASTBAR,GG);
DRAWNUMBER(L>0,GG1,GG1,0),COLORCYAN;
TMP:=K2; 
W1:=K2;
W2:=OPEN-CLOSE;


HT:=IF(OPEN>CLOSE,OPEN,CLOSE);
LT:=IF(OPEN<CLOSE,OPEN,CLOSE);
//DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN);
//DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN);
//DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED);
//DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED);
STICKLINE(W1>0,OPEN,CLOSE,9,1),COLORCYAN;
STICKLINE(W1<=0,OPEN,CLOSE,9,1),COLORRED;
STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,9,0),COLORRED;
STICKLINE(W2>0&&W1>0,OPEN,CLOSE,9,0),COLORCYAN;
DRAWTEXT(CROSS(TMP,0),H,'卖');
DRAWTEXT(CROSS(0,TMP),L,'买'); 
DRAWNUMBER(CROSS(TMP,0),G,G,2),COLORGREEN;
DRAWNUMBER(CROSS(0,TMP),N,N,2),COLORYELLOW,ALIGN0;


D1过滤:=FILTER(BACKSET(FILTER(REF(H,5)=HHV(H,2*5+1),5),5+1),5);
D2过滤:=FILTER(BACKSET(FILTER(REF(L,5)=LLV(L,2*5+1),5),5+1),5);
H1过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1过滤:=D2过滤 AND NOT((D1过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2<(H+L)/2));
H2过滤:=D1过滤 AND NOT((D2过滤 AND (REF(LLV(L,2*5),1)+REF(HHV(H,2*5),1))/2>=(H+L)/2));
F1过滤:=BACKSET(H1过滤 AND COUNT(L1过滤,REF(BARSLAST(H1过滤),1)+1)>0,LLVBARS(L,REF(BARSLAST(H1过滤),1)+1)+1);
LD过滤:=BACKSET(F1过滤>REF(F1过滤,1),1)>REF(BACKSET(F1过滤>REF(F1过滤,1),1),1);
L2过滤:=LD过滤 OR ISLASTBAR OR BARSCOUNT(C)=1;
F2过滤:=BACKSET(L2过滤 AND COUNT(H2过滤,REF(BARSLAST(L2过滤),1)+1)>0,HHVBARS(H,REF(BARSLAST(L2过滤),1)+1)+1);
HD过滤:=BACKSET(F2过滤>REF(F2过滤,1),1)>REF(BACKSET(F2过滤>REF(F2过滤,1),1),1);
HH过滤:=HD过滤&&NOT(LD过滤)&&REFX(BACKSET(HD过滤&&H>=HHV(H,BARSLAST(LD过滤)),BARSLAST(LD过滤))<>1,1);
LL过滤:=LD过滤&&NOT(HD过滤)&&REFX(BACKSET(LD过滤&&L<=LLV(L,BARSLAST(HD过滤)),BARSLAST(HD过滤))<>1,1);
AA:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,2));
BB:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,2));
CC:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤))-REF(H,SUMBARS(HH过滤=1,2)),REF(H,BARSLAST(HH过滤))-REF(L,SUMBARS(LL过滤=1,2)));
DD:=IF(BARSLAST(HH过滤)>BARSLAST(LL过滤),REF(L,BARSLAST(LL过滤)),REF(H,BARSLAST(HH过滤)));

//DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)>=0,L,HH过滤&&AA&&REFX1(CC,10000)>=0,H,0),COLORRED,LINETHICK3;
//DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)>=0,H,LL过滤&&BB&&REFX1(CC,10000)>=0,L,0),COLORRED,LINETHICK3;
//DRAWLINE1(LL过滤&&BB&&REFX1(CC,10000)<0,L,HH过滤&&AA&&REFX1(CC,10000)<0,H,0),COLORGREEN,LINETHICK3;
//DRAWLINE1(HH过滤&&AA&&REFX1(CC,10000)<0,H,LL过滤&&BB&&REFX1(CC,10000)<0,L,0),COLORGREEN,LINETHICK3;
SS:=BACKSET(ISLASTBAR,SUMBARS(LL过滤,1));
QQ:=BACKSET(ISLASTBAR,SUMBARS(HH过滤,1));
DRAWKLINEEX(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),H,O,L,C),COLORRED;
DRAWKLINEEX(C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),H,O,L,C),COLORRED;
DRAWKLINEEX(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),H,O,L,C),COLORGREEN;
DRAWKLINEEX(C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),H,O,L,C),COLORGREEN;
做多:IF(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C>REF(L,BARSLAST(LL过滤))&&ISUP&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5))||C>REF(L,BARSLAST(LL过滤))&&ISDOWN&&SS&&BARSLAST(CROSS(QQ,0.5))>BARSLAST(CROSS(SS,0.5)),0.5),L),DRAWNULL),COLORCC33FF,LINETHICK4;
做空:IF(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),VALUEWHEN(CROSS(C<REF(H,BARSLAST(HH过滤))&&ISUP&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5))||C<REF(H,BARSLAST(HH过滤))&&ISDOWN&&QQ&&BARSLAST(CROSS(QQ,0.5))<BARSLAST(CROSS(SS,0.5)),0.5),H),DRAWNULL),COLORFFFFFF,LINETHICK4;
DRAWTEXT(ISLASTBAR,做多,'做多'),COLORFFFFFF,FONTSIZE25,ALIGN2;
DRAWTEXT(ISLASTBAR,做空,'做空'),COLORFFFFFF,FONTSIZE25,ALIGN2;


DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF(G,1),COLORFF8000),LINETHICK3;
DRAWLINE(TMP=-3&&REF(TMP,1)=-3,N,TMP=-3&&REF(TMP,1)=-3,REF(N,1),COLOR990099),LINETHICK3;
DRAWSL(K2=1,G,0,1,0),COLORFF8000,LINETHICK3;
DRAWSL(K2=-3,N,0,1,0),COLOR990099,LINETHICK3;
Q:=BARSLAST(CROSS(K2,0))+1;
W:=BARSLAST(CROSS(0,K2))+1;
DRAWSL(CROSS(K2,0),HHV(H,W),0,-HHVBARS(H,W),0),COLORFF8000,LINETHICK3;
DRAWSL(CROSS(0,K2),LLV(L,Q),0,-LLVBARS(L,Q),0),COLOR990099,LINETHICK3;
DRAWLINE(CROSS(K2,0)&&K2=1,G,CROSS(K2,0)&&K2=1,HHV(H,W),COLORFF8000),LINETHICK3;
DRAWLINE(CROSS(0,K2)&&K2=-3,G,CROSS(0,K2)&&K2=-3,LLV(L,Q),COLOR990099),LINETHICK3;

HH01:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),HHV(H,2),0);
LL01:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),LLV(L,2),0);
HH02:=VALUEWHEN(HH01>0,HH01);
LL02:=VALUEWHEN(LL01>0,LL01);
K01:=IF(CLOSE>HH02,-3,IF(CLOSE<LL02,1,0));
K02:=VALUEWHEN(K01<>0,K01);
DRAWTEXT(CROSS(K02,0),REF(H,3),'顶'),COLORGREEN,FONTSIZE20,ALIGN2;
DRAWTEXT(CROSS(0,K02),REF(L,2),'底'),COLORYELLOW,VALIGN0,FONTSIZE20,ALIGN2;





DAYBARPOS:=BARSLAST(REF(HOUR,1)=15 AND HOUR<>15);
A:=BACKSET(ISLASTBAR,DAYBARPOS);
IF(A,REF(HHV(H,DAYBARPOS),DAYBARPOS),DRAWNULL);
IF(A,REF(LLV(L,DAYBARPOS),DAYBARPOS),DRAWNULL);
DRAWTEXT(ISLASTBAR,REF(HHV(H,DAYBARPOS),DAYBARPOS),'昨天最高价');
DRAWTEXT(ISLASTBAR,REF(LLV(L,DAYBARPOS),DAYBARPOS),'昨天最低价'); 谢谢老师,效果不对

 
  来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容