W:=BARSLAST(DISPSTATUS=1);
低涨:(H/LLV(LOW,W)-1)*100,COLOR0000FF,LINETHICK0,PRECIS2;
高跌:(L/HHV(HIGH,W)-1)*100,COLOR0000FF,LINETHICK0,PRECIS2;
天日:BARSLAST(L=LLV(LOW,W)),COLOR00FFFF,LINETHICK0,PRECIS0;
天:BARSLAST(H=HHV(HIGH,W)),COLOR00FFFF,LINETHICK0,PRECIS0;
{以下设置提示文字部分}
DRAWTEXTREL(15,100,'■低点至今日最高点上涨:'+NUMTOSTRN(低涨,2)+'% '+NUMTOSTRN(天日,0)+'天'),COLORFF50FF;
DRAWTEXTREL(15,180,'■高点至今日最低点下跌:'+NUMTOSTRN(高跌,2)+'% '+NUMTOSTRN(天,0)+'天'),COLORFF50FF;
DRAWTEXTREL(15,260,'■目前可见K线:'+NUMTOSTRN(W+1,0)+'天'),COLOR00FF00;
INPUT:N(10,1,100);
X:ZIG(4,n);
S:=FLATZIGA(X,0.01);
TJ:=S=1 OR S=0 AND BARPOS>1;
xj:=if(x
ss:=if(x>ref(x,1),TROUGHBARS(4,10,1),0);
t:=ss+xj;
k:=BARPOS;
Rq:=DATE;
k1:=0*c;
rq1:=0*c;
t1:=0*c;
w:=LBOUND(t);
FOR i=w to datacount do
if tj=1 then begin
k1:=k;
rq1:=rq;
t1:=t;
end;
tt:=t1;
x1:=if(s=1,x*1.03,x/1.03);
x2:=if(s=1,x*1.015,x/1.015);
x3:=if(s=1,x*1.045,x/1.045);
x4:=if(s=1,x*1.05,x/1.05);
zr:=DATEDIFF(rq[1],rq1);
DRAWNUMBER(tj,x4,t,0),align1,COLORYELLOW;{上升下降天数}
DRAWTEXT(s=1,x4,'上升'+' '+'天')align0,COLORYELLOW;
DRAWTEXT(s=0,x4,'下降'+' '+'天')align0,COLORYELLOW;