N:=3;
DRAWBKBMP(CLOSE,'背景4');
Z:=ZIG(4,N);
F:=Z-REF(Z,1);
D:=FILTER(REFX(F>0 AND REF(F,1)<0,1) OR BARPOS=1,2);
WD:=BARSLAST(D);
G:=FILTER(REFX(F<0 AND REF(F,1)>0,1) OR BARPOS=1,2);
WG:=BARSLAST(G);
XWD:=IF((SUM(WD=0,2))>1,1,WD);
XWG:=IF((SUM(WG=0,2))>1,1,WG);
{www.gUPaNg.com 股旁网_最新股票指标公式}
FD:=HHV(HIGH,XWD)/REF(LOW,XWD)-1>N/100;
FG:=1-LLV(LOW,XWG)/REF(HIGH,XWG)>N/100;
DQZ:=(BACKSET(ISLASTBAR AND WD<WG AND FD=0,XWD+1))=0;
GQZ:=(BACKSET(ISLASTBAR AND WG<WD AND FG=0,XWD+1))=0;
顶卖:GQZ*G OR BARPOS=1;
底买:DQZ*D OR BARPOS=1;
202108211212.jpg
|