MA(CLOSE,5);
//福安赚差价的人,设计QQ624544691
//高低点一定是前6天和后6天的最高点和最低点//
BD1:=LOW<=LLV(LOW,6) AND REFX(LOW,1)>=LOW AND REFX(LOW,2)>=LOW AND REFX(LOW,3)>=LOW AND REFX(LOW,4)>=LOW AND REFX(LOW,5)>=LOW ;//笔高,粗选//
BG1:= HIGH>=HHV(HIGH,6) AND REFX(HIGH,1)<=HIGH AND REFX(HIGH,2)<=HIGH AND REFX(HIGH,3)<=HIGH AND REFX(HIGH,4)<=HIGH AND REFX(HIGH,5)<=HIGH ;//笔低,粗选//
BDQ:=(REFX(BD1,1)=1 AND BARSLAST(BG1)>=3) OR (REFX(BD1,1)=1 AND COUNT(BD1,BARPOS)=0 AND COUNT(BG1,BARPOS)=0) ;
BDQ1:=(BDQ AND COUNT(BDQ,BARSLAST(BG1))=1) OR ( BARSSINCE(BDQ)=0);
BD2:=(BD1 AND BARSLAST(BG1)>3 AND LOW<=LLV(LOW,BARSLAST(BDQ1)) AND COUNT(BG1,BARSLAST(BDQ1))=0) OR (BD1 AND LOW<=LLV(LOW,BARSLAST(BDQ1)) AND COUNT(BG1,BARPOS)=0 );
BDDW:=BACKSET(BD2,BARSLAST(BDQ1));
//DRAWTEXT(BDDW,HIGH,'1');
//DRAWTEXT((BDDW AND REFX(BDDW,1)=0),LOW*0.94,'第二低点');//
BD3:=(BDDW AND REFX(BDDW,1)=0) OR (BDDW AND ISLASTBAR) OR (BD1 AND BARSLAST(BG1)<4);//修改过,去除高低点在同一根//
//笔高前一根//
BGQ:=(REFX(BG1,1)=1 AND BARSLAST(BD1)>=3) OR (REFX(BG1,1)=1 AND COUNT(BD1,BARPOS)=0 AND COUNT(BG1,BARPOS)=0);html5源代码免费
//DRAWTEXT(BGQ ,HIGH,'前')COL OR YELLOW;//测试低点//
BGQ1:=(BGQ AND COUNT(BGQ,BARSLAST(BD1))=1) OR ( BARSSINCE(BGQ)=0);
//DRAWTEXT(BGQ1 ,HIGH*1.03,'第一前')COL OR CYAN;//测试低点//
//新笔高//
BG2:=(BG1 AND BARSLAST(BD1)>3 AND HIGH>=HHV(HIGH,BARSLAST(BGQ1)) AND COUNT(BD1,BARSLAST(BGQ1))=0 ) OR (BG1 AND HIGH>=HHV(HIGH,BARSLAST(BGQ1)) AND COUNT(BD1,BARPOS)=0 );
BGDW:=BACKSET(BG2,BARSLAST(BGQ1));
//DRAWTEXT((BGDW AND REFX(BGDW,1)=0),HIGH*1.03,'第二高');//
BG3:=(BGDW AND REFX(BGDW,1)=0) OR (BGDW AND ISLASTBAR) OR (BG1 AND BARSLAST(BD1)<4) ;
//跟前面的笔高距离小于4,并且价格是最低的//
//笔低前一根//
BDQ30:=(REFX(BD1,1)=1 ) OR (REFX(BD1,1)=1 AND COUNT(BD1,BARPOS)=0 AND COUNT(BG1,BARPOS)=0) ;
BDQ130:=(BDQ30 AND COUNT(BDQ30,BARSLAST(BG1))=1) OR ( BARSSINCE(BDQ30)=0);
//DRAWTEXT(BDQ ,LOW*0.98,'前')COL OR YELLOW;//测试低点//
//DRAWTEXT(BDQ1,LOW*0.96,'第一前')COL OR CYAN;//测试低点//
//新BD2//
BD230:=(BD1 AND LOW<=LLV(LOW,BARSLAST(BDQ130)) AND COUNT(BG1,BARSLAST(BDQ130))=0 ) OR (BD1 AND LOW<=LLV(LOW,BARSLAST(BDQ130)) AND COUNT(BG1,BARPOS)=0 );
BDDW30:=BACKSET(BD230,BARSLAST(BDQ130));
BD4:=BDDW30 AND REFX(BDDW30,1)=0;
BD5:=BD3 OR (BD4 AND BARSLAST(BG1)<4 ) ;
//跟前面的笔低距离小于4,并且价格是最高的//
//笔高前一根//
BGQ30:=(REFX(BG1,1)=1 ) OR (REFX(BG1,1)=1 AND COUNT(BD1,BARPOS)=0 AND COUNT(BG1,BARPOS)=0);
//DRAWTEXT(BGQ ,HIGH,'前')COL OR YELLOW;//测试低点//
BGQ130:=(BGQ30 AND COUNT(BGQ30,BARSLAST(BD1))=1) OR ( BARSSINCE(BGQ30)=0);
//DRAWTEXT(BGQ1 ,HIGH*1.03,'第一前')COL OR CYAN;//测试低点//
//新笔高//
BG230:=(BG1 AND HIGH>=HHV(HIGH,BARSLAST(BGQ130)) AND COUNT(BD1,BAR
SLAST(BGQ130))=0) OR (BG1 AND HIGH>=HHV(HIGH,BARSLAST(BGQ130)) AND COUNT(BD1,BARPOS)=0 );
BGDW30:=BACKSET(BG230,BARSLAST(BGQ130));
BG4:=BGDW30 AND REFX(BGDW30,1)=0;
BG5:=BG3 OR (BG4 AND BARSLAST(BD1)<4) ;
//去掉绝对错误低点//
BD6:=(BD5 AND LOW>=REF(HIGH,BARSLAST(BG5)) ) ;//最低价大于前笔高//
BD7:= BD5 AND REFX(HIGH,1)>=REF(HIGH,BARSLAST(BG5)) ;//笔低后面一根最高价大于前高//
//DRAWTEXT(BD7,HIGH,'错误低点');//
BD:=BD5 AND BD6=0 AND BD7=0;
/
/去掉绝对错误高点//
BG6:=BG5 AND HIGH<=REF(LOW,BARSLAST(BD5));
BG7:=BG5 AND REFX(LOW,1)<=REF(LOW,BARSLAST(BD5)) ;
BG:= BG5 AND BG6=0 AND BG7=0;
//DRAWTEXT(BD5 ,LOW,'低点')COL OR RED;//测试低点//
//DRAWTEXT(BG5,HIGH,'高点')COL OR GREEN;//测试高点//
//DRAWTEXT(BD1 ,LOW,'低点') ;//测试低点//
//DRAWTEXT(BG1,HIGH,'高点') ;//测试高点//
//DRAWTEXT(BD,LOW ,'Y低点');//测试低点//
//DRAWTEXT(BG,HIGH ,'Y高点') ;//测试高点//
JQD:=BARSLAST(BD);//距前低//
JQG:=BARSLAST(BG);//距前高//
//K线包含处理//
//前面顶部左侧K线第1根是否跟前一根重合//
DQBHGG:=(REF(LOW,JQG+1)<=REF(LOW,JQG+2) AND REF(HIGH,JQG+1)>=REF(HIGH,JQG+2)) OR (REF(LOW,JQG+1)>=REF(LOW,JQG+2) AND REF(HIGH,JQG+1)<=REF(HIGH,JQG+2));
//前面底部的左侧第一根K线是否跟前一根重合//
DDQQBBHH:=(REF(LOW,JQD+1)<=REF(LOW,JQD+2) AND REF(HIGH,JQD+1)>=REF(HIGH,JQD+2)) OR (REF(LOW,JQD+1)>=REF(LOW,JQD+2) AND REF(HIGH,JQD+1)<=REF(HIGH,JQD+2));
//当前位置左右侧跟前面高点点最高点是否包含判断//
ADQGYCA:=(REFX(LOW,1)<=REFX(LOW,2) AND REFX(HIGH,1)>=REFX(HIGH,2)) OR
(REFX(LOW,1)>=REFX(LOW,2) AND REFX(HIGH,JQG+1)<=REFX(HIGH,2));
KAKDZC:=(REF(LOW,1)<=REF(LOW,2) AND REF(HIGH,1)>=REF(HIGH,2)) OR (REF(LOW,1)>=REF(LOW,2) AND REF(HIGH,JQG+1)<=REF(HIGH,2));
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论