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

请老师改成博弈指标 [博易POBO]

咨询内容:

请老师改成博弈指标

N:=8;
AA:=REF(H,N)=HHV(H,2*N+1);
AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1);
QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);
CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC);
DD1:=BARSLAST(CC1);
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
GDTS:=IF(CC,CURRBARSCOUNT,0);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=REFX1(DINGBUTS,10000);
DDCS1:=REFX1(DDTS1,10000);
GDCS13:=REFX1(REF(HIGH,GDCS1-1),10000);
DDCS13:=REFX1(REF(L,DDCS1-1),10000);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=REFX1(DINGBUTS1,10000);
DDCS2:=REFX1(DDTS2,10000);
GDCS23:=REFX1(REF(HIGH,DINGBUTS1-1),10000);
DDCS23:=REFX1(REF(L,DDTS2-1),10000);
XG1:=BACKSET(ISLASTBAR,GDCS1);
XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);
XD2:=BACKSET(ISLASTBAR,DDTS2);



EXP1:=EMA(CLOSE, 12), COLORYELLOW, LINETHICK3;
EXP2:=EMA(CLOSE, 47), COLORMAGENTA, LINETHICK3;

/*
STICKLINE(C>EXP1 AND C>EXP2, H, L, 0, 0), COLORRED;
//{上下影线,可不画}
STICKLINE(C>EXP1 AND C>EXP2 AND C>=O, O, C, 3, 1), COLORRED;
STICKLINE(C>EXP1 AND C>EXP2 AND C<O, O, C, 3, 0), COLORRED;
STICKLINE(C<EXP1 AND C>EXP2, H, L, 0, 0), COLORYELLOW;
//{上下影线,可不画}
STICKLINE(C<EXP1 AND C>EXP2 AND C>=O, O, C, 3, 1), COLORYELLOW;
STICKLINE(C<EXP1 AND C>EXP2 AND C<O, O, C, 3, 0),COLORYELLOW;
STICKLINE(C>EXP1 AND C<EXP2, H, L, 0, 0),COLORBLUE;
//{上下影线,可不画}
STICKLINE(C>EXP1 AND C<EXP2 AND C>=O, O, C, 3, 1), COLORBLUE;
STICKLINE(C>EXP1 AND C<EXP2 AND C<O, O, C, 3, 0),COLORBLUE;
STICKLINE(C<EXP1 AND C<EXP2, H, L, 0, 0), COLORGREEN;
//{上下影线,可不画}
STICKLINE(C<EXP1 AND C<EXP2 AND C>=O, O, C, 3, 1), COLORGREEN;
STICKLINE(C<EXP1 AND C<EXP2 AND C<O, O, C, 3, 0), COLORGREEN;

*/
STICKLINE1(XG2,GDCS23,GDCS23+0.1,2,0),COLORCYAN;
STICKLINE1(XG1,GDCS13,GDCS13+0.1,2,0),COLORGREEN;
STICKLINE1(XD2,DDCS23,DDCS23+0.1,2,0),COLORRED;
STICKLINE1(XD1,DDCS13,DDCS13+0.1,2,0),RGB(255,128,192);
DRAWICON(CROSS(XG2,0.5),GDCS23,'ICO119');
DRAWICON(CROSS(XG1,0.5),GDCS13,'ICO119');
DRAWICON(CROSS(XD2,0.5),DDCS23,'ICO119');
DRAWICON(CROSS(XD1,0.5),DDCS13,'ICO119');

A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
D1:=FILTER(C1,10);
{高点}
A2:=REF(LOW,10)=LLV(LOW,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
D2:=FILTER(C2,10);
{低点}
E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT((D1 AND E1<E2)));
H2:=D1 AND NOT((D2 AND E1>=E2));
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=REF(ISNULL(F1),1)=1&&F1=1;
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=REF(ISNULL(F2),1)=1&&F2=1;
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
//{过滤后高点}
DRAWLINE1(LD,L,HD,H,0),COLORMAGENTA,LINETHICK3;
DRAWLINE1(HD,H,LD,L,0),COLORMAGENTA,LINETHICK3;
J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J2:=J1>REF(J1,1);
DRAWLINE1(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK3;


UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE1(XX,L,VV,L,1),COLORRED,LINETHICK3;
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE1(XX2,H,VV2,H,1),COLORRED,LINETHICK3;

 

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

博易技术人员: N:=8;
AA:=REF(H,N)=HHV(H,2*N+1);
AA1:=REF(L,N)=LLV(L,2*N+1);
QY:=BACKSET(AA,N+1);
QY1:=BACKSET(AA1,N+1);
CC:=FILTER(QY,N) AND H=HHV(H,N+1);
CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);
DDD:=BARSLAST(CC);
DD1:=BARSLAST(CC1);
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
GDTS:=IF(CC,CURRBARSCOUNT,0);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
GDCS1:=REFX(DINGBUTS,10000);
DDCS1:=REFX(DDTS1,10000);
GDCS13:=REFX(REF(HIGH,GDCS1-1),10000);
DDCS13:=REFX(REF(L,DDCS1-1),10000);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
DDTS2:=REF(DDTS1,DD1+1);
GDCS2:=REFX(DINGBUTS1,10000);
DDCS2:=REFX(DDTS2,10000);
GDCS23:=REFX(REF(HIGH,DINGBUTS1-1),10000);
DDCS23:=REFX(REF(L,DDTS2-1),10000);
XG1:=BACKSET(ISLASTBAR,GDCS1);
XD1:=BACKSET(ISLASTBAR,DDCS1);
XG2:=BACKSET(ISLASTBAR,DINGBUTS1);
XD2:=BACKSET(ISLASTBAR,DDTS2);



EXP1:=EMA(CLOSE, 12), COLORYELLOW, LINETHICK3;
EXP2:=EMA(CLOSE, 47), COLORMAGENTA, LINETHICK3;


STICKLINE(XG2,GDCS23,GDCS23+0.1,2,0),COLORCYAN;
STICKLINE(XG1,GDCS13,GDCS13+0.1,2,0),COLORGREEN;
STICKLINE(XD2,DDCS23,DDCS23+0.1,2,0),COLORRED;
STICKLINE(XD1,DDCS13,DDCS13+0.1,2,0),COLORC080FF;
DRAWICON(CROSS(XG2,0.5),GDCS23,1);
DRAWICON(CROSS(XG1,0.5),GDCS13,1);
DRAWICON(CROSS(XD2,0.5),DDCS23,1);
DRAWICON(CROSS(XD1,0.5),DDCS13,1);

A1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
D1:=FILTER(C1,10);
{高点}
A2:=REF(LOW,10)=LLV(LOW,2*10+1);
B2:=FILTER(A2,10);
C2:=BACKSET(B2,10+1);
D2:=FILTER(C2,10);
{低点}
E1:=(REF(LLV(LOW,2*10),1)+REF(HHV(HIGH,2*10),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT((D2 AND E1>=E2))) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT((D1 AND E1<E2)));
H2:=D1 AND NOT((D2 AND E1>=E2));
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=REF(F1,1)=1&&F1=1;
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=REF(F2,1)=1&&F2=1;
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
//{过滤后高点}
DRAWLINE(LD,L,HD,H,0),COLORMAGENTA,LINETHICK3;
DRAWLINE(HD,H,LD,L,0),COLORMAGENTA,LINETHICK3;
J1:=BACKSET(ISLASTBAR ,MIN(BARSLAST(HD),BARSLAST(LD))+1);
J2:=J1>REF(J1,1);
DRAWLINE(J2,IF(HD,H,L),ISLASTBAR ,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),COLORWHITE,LINETHICK3;


UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
DRAWLINE(XX,L,VV,L,1),COLORRED,LINETHICK3;
UU2:=BACKSET(ISLASTBAR,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
DRAWLINE(XX2,H,VV2,H,1),COLORRED,LINETHICK3; 谢谢老师,咋没有图中圆圈处的压撑


  来源 程序化久久网

 

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

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

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

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


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

相关文章

    没有相关内容