通达信今天距新低天数公式
用于叠加主图上的时间分析指标
{距新低天数}
ZT:=L<=LLV(L,120);
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
新低1:=STICKLINE(C,(REF(L,BH)+CZ*0.5),(REF(L,BH)+CZ*0.5),2,0),COLORRED;
新低2:=STICKLINE(C,REF(L,BH),REF(L,BH),2,0),COLORBLUE;
新低3:=STICKLINE(ZT,REF(O,BH),REF(C,BH),2,0),COLORYELLOW;
新低:=DRAWTEXT(ZT,L*0.98,'新低'),COLORF00FF0;
VARZT:=BARSLAST(C/REF(C,1)>1.097);
DRAWTEXT(BH=2,L*0.95,'3'),COLORCYAN;
DRAWTEXT(BH=4,H*1.06,'5'),COLORCYAN;
DRAWTEXT(BH=6,L*0.95,'7'),COLORCYAN;
DRAWTEXT(BH=9,H*1.06,'10'),COLORCYAN;
DRAWTEXT(BH=19,L*0.95,'20'),COLORCYAN;
DRAWTEXT(BH=29,H*1.06,'30'),COLORCYAN;
DRAWTEXT(BH=59,L*0.95,'60'),COLORCYAN;
DRAWTEXT(BH=89,H*1.06,'90'),COLORCYAN;
DRAWTEXT(BH=119,L*0.95,'120'),COLORCYAN;
DRAWTEXT(BH=249,H*1.06,'250'),COLORCYAN;
DRAWTEXT(BH=359,L*0.95,'360'),COLORCYAN;