JJ:=AMOUNT/vol/100;
VAR0:=BArslASTCOUNT(C>O);
T:=BARSLAST(crOSS(VAR0=1 AND REFX(VAR0=2,1),0.5));
VAR2:=IF(ISLASTBAR,VAR0>1,VAR0>1 AND REFX(C<=O,1));
T2:=BARSLAST(VAR2);
中间价:CONST((REF(HHV(C,T+1),T2)+REF(LLV(O,T+1),T2))/2),NODRAW;
中间均价:CONST(REF(SUM(JJ,T+1)/(T+1),T2)),NODRAW;
IF(CURRBARSCOUNT<=CONST(T)+1,中间价,DRAWNULL),COLORYELLOW;
IF(CURRBARSCOUNT<=CONST(T)+1,中间均价,DRAWNULL),COLORMAGENTA;