求助!怎样把多余的"空空空"信号过滤掉,只显示第一个信号 [博易POBO]
咨询内容:
MA5:MA(C,5),COLORFFFFFF,PRECIS0;
MA60:=MA(C,60);
GD:=CROSS(C,MA60) AND(H-L)>=10;
GD2:=CROSS(MA60,C)AND(H-L)>=10;
STICKLINE(DATAPERIOD=1ANDGD2,O,C,12,0),COLORFF0000;
STICKLINE(DATAPERIOD=1ANDGD2,H,L,0.1,0),COLORFF0000;
STICKLINE(DATAPERIOD=1ANDGD,O,C,12,0),COLOR0000FF;
STICKLINE(DATAPERIOD=1ANDGD,H,L,0.1,0),COLOR0000FF;
GD3:=REF(C,1)<MA60ANDO>MA60ANDC<MA60AND(H-L)>=10;
W:=BARSLAST(GDORGD2ORGD3);
HH:=REF(H,W);
LL:=REF(L,W);
BFW:=(HH+LL)/2;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDHH,HH,HH,12,0),COLOR00FFFF,LINETHICK1;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDLL,LL,LL,12,0),COLOR00FFFF,LINETHICK1;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDBFW,BFW,BFW,3,0),COLORE7E7E7,LINETHICK1;
JC:=CROSS(C,HH)ANDC>OANDC>MA60ANDC>MA5ANDMA5>REF(MA5,1);
SC:=CROSS(LL,C)ANDC<OANDC<MA60ANDC<MA5ANDMA5<REF(MA5,1);
GLJC{过滤信号}:=FILTER(JC,1);
GLSC{过滤信号}:=FILTER(SC,1);
DRAWTEXT(DATAPERIOD=1ANDISSTOCK('rb')ANDGLJC,L*0.9985,'多'),ALIGN1,VALIGN0,COLOR0000FF;
DRAWTEXT(DATAPERIOD=1ANDISSTOCK('rb')ANDGLSC,H*1.0019,'空'),ALIGN1,VALIGN0,COLOR00FF00;
W2:=BARSLAST(GLJCORGLSC);
TJ:=W2>1ANDW2<60;
HH2:=HH+20;
LL2:=LL-20;
DTPC:=CROSS(O,HH2)ORCROSS(H,HH2)ORCROSS(C,HH2);
DPTJ:=DTPCANDC>MA60ANDC>MA60ANDMA60>MA60;
KTPC:=CROSS(LL2,O)ORCROSS(LL2,L)ORCROSS(LL2,C);
KPTJ:=KTPCANDC<MA60ANDC<MA60;
DP:=DTPCANDDPTJ;
KP:=KTPCANDKPTJ;
GLDP{过滤信号}:=FILTER(DP,1);
GLKP{过滤信号}:=FILTER(KP,1);
DRAWICON(DATAPERIOD=1 ANDISSTOCK('rb')ANDGLDPANDTJ,L*0.999,1),ALIGN1,VALIGN0;
DRAWICON(DATAPERIOD=1 ANDISSTOCK('rb')ANDGLKPANDTJ,H*1.002,1),ALIGN1,VALIGN0;
来源 程序化久久网
求助!怎样把多余的"空空空"信号过滤掉,只显示第一个信号
不要用GLKXH{过滤信号} <!-- 咨询内容:附件 :
-->
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 这个需要看您的条件,既然要过滤信号,那是要用到过滤函数,否则也谈不上过滤了。 原码如下:(只显示第一个空,怎样写公式)MA5:MA(C,5),COLORFFFFFF,PRECIS0;
MA60:=MA(C,60);
GD:=CROSS(C,MA60) AND(H-L)>=10;
GD2:=CROSS(MA60,C)AND(H-L)>=10;
STICKLINE(DATAPERIOD=1ANDGD2,O,C,12,0),COLORFF0000;
STICKLINE(DATAPERIOD=1ANDGD2,H,L,0.1,0),COLORFF0000;
STICKLINE(DATAPERIOD=1ANDGD,O,C,12,0),COLOR0000FF;
STICKLINE(DATAPERIOD=1ANDGD,H,L,0.1,0),COLOR0000FF;
GD3:=REF(C,1)<MA60ANDO>MA60ANDC<MA60AND(H-L)>=10;
W:=BARSLAST(GDORGD2ORGD3);
HH:=REF(H,W);
LL:=REF(L,W);
BFW:=(HH+LL)/2;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDHH,HH,HH,12,0),COLOR00FFFF,LINETHICK1;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDLL,LL,LL,12,0),COLOR00FFFF,LINETHICK1;
STICKLINE(DATAPERIOD=1ANDISSTOCK('rb')ANDBFW,BFW,BFW,3,0),COLORE7E7E7,LINETHICK1;
JC:=CROSS(C,HH)ANDC>OANDC>MA60ANDC>MA5ANDMA5>REF(MA5,1);
SC:=CROSS(LL,C)ANDC<OANDC<MA60ANDC<MA5ANDMA5<REF(MA5,1);
GLJC{过滤信号}:=FILTER(JC,1);
GLSC{过滤信号}:=FILTER(SC,1);
DRAWTEXT(DATAPERIOD=1ANDISSTOCK('rb')ANDGLJC,L*0.9985,'多'),ALIGN1,VALIGN0,COLOR0000FF;
DRAWTEXT(DATAPERIOD=1ANDISSTOCK('rb')ANDGLSC,H*1.0019,'空'),ALIGN1,VALIGN0,COLOR00FF00;
W2:=BARSLAST(GLJCORGLSC);
TJ:=W2>1ANDW2<60;
HH2:=HH+20;
LL2:=LL-20;
DTPC:=CROSS(O,HH2)ORCROSS(H,HH2)ORCROSS(C,HH2);
DPTJ:=DTPCANDC>MA60ANDC>MA60ANDMA60>MA60;
KTPC:=CROSS(LL2,O)ORCROSS(LL2,L)ORCROSS(LL2,C);
KPTJ:=KTPCANDC<MA60ANDC<MA60;
DP:=DTPCANDDPTJ;
KP:=KTPCANDKPTJ;
GLDP{过滤信号}:=FILTER(DP,1);
GLKP{过滤信号}:=FILTER(KP,1);
DRAWICON(DATAPERIOD=1 ANDISSTOCK('rb')ANDGLDPANDTJ,L*0.999,1),ALIGN1,VALIGN0;
DRAWICON(DATAPERIOD=1 ANDISSTOCK('rb')ANDGLKPANDTJ,H*1.002,1),ALIGN1,VALIGN0;
来源 程序化久久网
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 或微信号:cxh99cxh99 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)
相关文章
-
没有相关内容