:=500;N:=95;DA1:=IF(TS>TOTALBARSCOUNT,TOTALBARSCOUNT,TS);DA:=IF(CURRBARSCOUNT>DA1,0,DA1);HI:=REFDATE(HHV(H,DA),DATE);{最高价}LO:=REFDATE(LLV(L,DA),DATE);C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);GZ:=EXP(LN(HI/LO)/15); {对数格值}LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0)