|
TT:=BARSCOUNT(C)+1;
M:=SUM(V*C,TT)/SUM(V,TT),COLORYELLOW;
P2:=240;
TC1:=IF(H=HHV(H,P2),C,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,C,REF(C,TC2-1)));
BC1:=IF(L=LLV(L,P2),C,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,C,REF(C,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND C=LOWER;{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND C=UPPER;{高点定位}
低点:=LOWER;
高点:=UPPER;
TTT:=MAX(TC2,BC2);
ZZ:=(高点+低点)/2;
ZH:=(高点+ZZ)/2;
ZL:=(ZZ+低点)/2;
EE:=CURRBARSCOUNT<=TTT;
IF(EE,ZL,DRAWNULL),COLOR0099FF;
IF(EE,ZH,DRAWNULL),COLORFF9900;
IF(EE,ZZ,DRAWNULL),COLORWHITE;
IF(EE,高点,DRAWNULL),COLOR00FFCC;
IF(EE,低点,DRAWNULL),COLOR00CC00; |
|