CURRBARSCOUNT=REFX1(BARPOS,9999)-BARPOS+1;
{箱体}
TC1S=IF(H=HHV(H,48),H,NULL);
TC2S=REFX1(BARSLAST(TC1S=H),9999)+1;
UPPERS=REFX1(IF(TC2S=1,H,REF(H,TC2S-1)),9999);
BC1S=IF(L=LLV(L,48),L,NULL);
BC2S=REFX1(BARSLAST(BC1S=L),9999)+1;
LOWERS=REFX1(IF(BC2S=1,L,REF(L,BC2S-1)),9999);
LPS=CURRBARSCOUNT=BC2S AND L=LOWERS;
HPS=CURRBARSCOUNT=TC2S AND H=UPPERS;
AB1S=EMA(((2C+H+L)4-LLV(LOW,30))
(HHV(HIGH,30)-LLV(LOW,30))100,8);
BA1S=EMA(AB1S,5);
上轨=REFX1(REF(HHV(MAX(C,O),96),5),9999);
下轨=REFX1(REF(LLV(MIN(C,O),96),5),9999);
中轨=((上轨)+(下轨))2;
YXHX=DATE=REF(DATE,BARSLAST(IF(BC2STC2S,LPS,HPS)));
上沿IF(AB1S0 AND AB1S-BA1S=0 AND YXHX,上轨,上轨),COLOR555555,LINETHICK2;
中枢IF(AB1S0 AND AB1S-BA1S=0 AND YXHX,中轨,中轨),COLOR555555,LINETHICK2;
下沿IF(AB1S0 AND AB1S-BA1S=0 AND YXHX,下轨,下轨),COLOR555555,LINETHICK2;
三K线=1;
DG=MAX(MAX(REFX(L,1),REFX(L,2)),REFX(L,3));
GD=MIN(MIN(REFX(H,1),REFX(H,2)),REFX(H,3));
uppersAA11=(DG+GD)2;
A11=AA11REFX(L,3) AND REFX(L,2) AA11 AND REFX(L,1) AA11 ;
A21=FILTER(A11,10);
A41=A11 AND A21;
A51=IF(REF(A41,1),H,0),NODRAW;
STICKLINE(三K线=1 && REF(A41,2),REF(GD,2),REF(DG,2),13,-1),COLORMAGENTA;
DRAWKLINE1(H,O,L,C);
峰谷=1;
PA=10;
PB=REF(HIGH,PA)=HHV(HIGH,2PA+1);
PC=FILTER(PB,PA);
PD=BACKSET(PC,PA+1);
PE=FILTER(PD,PA);
{高点}
峰线(REF(HIGH,BARSLAST(PE)))峰谷,COLORRED,POINTDOT,LINETHICK2;
AA21=REF(LOW,PA)=LLV(LOW,2PA+1);
BB21=FILTER(AA21,PA);
CC21=BACKSET(BB21,PA+1);
DD21=FILTER(CC21,PA);
{低点}
谷线(REF(LOW,BARSLAST(DD21)))峰谷,COLORGREEN,POINTDOT,LINETHICK2;
局部低点预选A=BACKSET(LLV(L,10)REF(LLV(L,9),1),9);
局部低点预选B=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A=BACKSET(HHV(H,10)REF(HHV(H,9),1),9);
局部高点预选B=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
缺口判断=IF(LREF(H,1),1,IF(HREF(L,1),-1,0));
距前高天=BARSLAST(局部高点预选C=1);
距前低天=BARSLAST(局部低点预选C=-1);
小值周期=20;
大值周期=20;
低保留AA=IF(局部低点预选C=-1 AND REF(距前高天,1)REF(距前低天,1) AND LLV(L,距前高天
+1)REF(LLV(L,距前高天+1),1),-1,0);
低保留AB=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND (距前高天=4
OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)REF(LLV(L,距前低天+1),1)),-1,0);
低保留S=IF((低保留AA=-1 OR 低保留AB=-1) AND LREF(H,距前高天+1),-1,0);
预判=IF((距前低天4 AND HHV(缺口判断,距前低天)1) OR REF(低保留S,距前低天)=0,1,0);
判断=IF(局部高点预选C=1 AND REF(距前低天,1)=REF(距前高天,1) AND 预判=1 AND 大值周期REF(小值周期,距前低天+1) AND 大值周期REF(小值周期,距前低天) AND 大值周期REF(大值周期,距前高天),1,0);
高保留A=IF(局部高点预选C=1 AND REF(距前低天,1)REF(距前高天,1) AND HHV(H,距前
低天
+1)REF(HHV(H,距前低天+1),1),1,0);
高保留B=IF(局部高点预选C=1 AND REF(距前低天,1)=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND HREF(L,距前低天+1),1,0);
预判A=IF((距前高天4 AND HHV(缺口判断,距前高天)1) OR REF(高保留,距前高天)=0,1,0);
判断A=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND 预判A=1 AND 小值周期REF(大值周期,距前高天+1) AND 小值周期REF(大值周期,距前高天) AND 小值周期REF(小值周期,距前低天),-1,0);
低保留A=IF(局部低点预选C=-1 AND REF(距前高天,1)REF(距前低天,1) AND LLV(L,距前高天
+1)REF(LLV(L,距前高天+1),1),-1,0);
低保留B=IF(局部低点预选C=-1 AND REF(距前高天,1)=REF(距前低天,1) AND (距前高天=4
OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);
低保留=IF((低保留A=-1 OR 低保留B=-1) AND LREF(H,距前高天+1),-1,0);
距前高天A=BARSLAST(高保留=1);
距前低天A=BARSLAST(低保留=-1);
预判X=IF((距前低天A4 AND HHV(缺口判断,距前低天A)1) OR REF(低保留,距前低天A)=0,1,0);
判断X=IF(局部高点预选C=1 AND REF(距前低天A,1)=REF(距前高天A,1) AND 预判X=1 AND
大值周期REF(小值周期,距前低天A+1) AND 大值周期REF(小值周期,距前低天A) AND 大值周期REF(大值周期,距前高天A),1,0);
高保留XA=IF(局部高点预选C=1 AND REF(距前低天A,1)REF(距前高天A,1) AND HHV(H,距前低天A+1)REF(HHV(H,距前低天A+1),1),1,0);
高保留XB=IF(局部高点预选C=1 AND REF(距前低天A,1)=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A=4 OR HHV(缺口判断,距前低天A)=1),1,0);
高保留X=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND HREF(L,距前低天A+1),1,0);
预判XA=IF((距前高天A4 AND HHV(缺口判断,距前高天A)1) OR REF(高保留XA,距前高天A)=0,1,0);
判断XA=IF(局部低点预选C=-1 AND REF(距前高天A,1)=REF(距前低天A,1) AND 预判XA=1
AND 小值周期REF(大值周期,距前高天A+1) AND 小值周期REF(大值周期,距前高天A) AND
小值周期REF(小值周期,距前低天A),-1,0);
低保留XA=IF(局部低点预选C=-1 AND REF(距前高天A,1)REF(距前低天A,1) AND LLV(L,距前高天A+1)REF(LLV(L,距前高天A+1),1),-1,0);
低保留XB=IF(局部低点预选C=-1 AND REF(距前高天A,1)=REF(距前低天A,1) AND (距前高天A=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);
低保留X=IF((低保留XA=-1 OR 低保留XB=-1) AND LREF(H,距前高天A+1),-1,0);
距前高天YA=BARSLAST(高保留X=1);
距前低天YA=BARSLAST(低保留X=-1);
预判YX=IF((距前低天YA4 AND HHV(缺口判断,距前低天YA)1) OR REF(低保留X,距前低天YA)=0,1,0);
判断YX=IF(局部高点预选C=1 AND REF(距前低天YA,1)=REF(距前高天YA,1) AND 预判YX=1
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论