fh:=h;fl:=l; for p=datacount-1 downto 1 do begin if fh[p]fh[p]:=fh[p+1]; if fl[p]>fl[p+1] then fl[p]:=fl[p+1]; end; qk:=l>ref(h,1)OR HG:=IF(l>ref(h,1),L,IF(HD:=IF(l>ref(h,1),ref(H,1),IF(HS:=IF(l>ref(h,1),2,IF(Htj:=s=2 and fL<=G AND fL>=D OR s=1 and fH=D ; w:=BARSSINCE(BACKSET(BARSTATUS=2,BARSLAST(TJ*BARPOS=BARPOS)+1))+1; DD:=DATE; 最近缺口日:REF(DD,W-1)+19000000,LINETHICK0,COLORAAFF33; S1:=IF(ref(S,W-1)=2,ref(fL,w-1),IF(ref(S,W-1)=1,ref(fH,w-1),0)); S2:=IF(ref(S,W-1)=2,ref(D,w-1),IF(ref(S,W-1)=1,ref(G,w-1),0)); A:=MAX(S1,S2); B:=MIN(S1,S2); 缺口:B[datacount],COLORWHITE,LINETHICK,,PRECISION2; →:A[datacount],COLORWHITE,LINETHICK,PRECISION2; STICKLINE(w,S1,S2,15,0),COLORGRAY; DRAWTEXT(BARSTATUS=2,A,NUMTOSTR(B,2)+'-'+NUMTOSTR(A,2)),COLOR0099CC,ALIGN2;{显示缺口数字 可删除} hh:=h;LL:=L;DD:=DATE; gb:=SYSPARAM(1); 上突缺口:=LOW>REF(HIGH,1),COLOR00EEFF,LINETHICK0; 下突缺口:=HIGHXQS:=ubound(下突缺口),LINETHICK0; s1:=SUMBARS(上突缺口,1); s2:=SUMBARS(上突缺口,2); x1:=SUMBARS(下突缺口,1); x2:=SUMBARS(下突缺口,2); 上突位置1:=gb-s1[gb]+1,LINETHICK0; 下突位置1:=gb-x1[gb]+1,LINETHICK0; DRAWTEXT(下突缺口,h,'△'),COLOREE9933,PXUP15,ALIGN0; {www.gpxiazai.com 股票软件下载网_最新股票指标公式} DRAWTEXT(下突缺口,ref(l,1),'?'),COLOREE9933,ALIGN0; DRAWTEXT(上突缺口,l,'?'),COLOR00EEFF,ALIGN0; DRAWTEXT(上突缺口,ref(h,1),'△'),COLOR00EEFF,PXUP15,ALIGN0; XQ1:=LL[下突位置1-1]; XQD:=DD[下突位置1]; BXQ:=COUNT(RANGE(BARPOS,下突位置1,XQS) AND HH>XQ1,XQS-下突位置1)=1; BXQ:=FILTER(BXQ,XQS-下突位置1); SQ1:=HH[上突位置1-1]; SQD:=DD[上突位置1]; 上缺日:IF(XQD下缺日:IF(SQDBSQ:=COUNT(RANGE(BARPOS,上突位置1,XQS) AND LLDRAWTEXT(BSQ,(o+c)/2,' n 补'+STRRIGHT(NUMTOSTR(SQD,0),6)+'n 上突缺口n '+numtostr(SQ1,2)),COLORFF99FF; DRAWTEXT(BSQ,SQ1,'←'),ALIGN0,COLOR00EEEE; DRAWTEXT(BXQ,(o+c)/2,' n 补'+STRRIGHT(NUMTOSTR(XQD,0),6)+'n 下突缺口n '+numtostr(XQ1,2)),COLOREEEE66; DRAWTEXT(BXQ,XQ1,'←'),ALIGN0,COLOR00EEEE; |