|
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;STICKLINE(IF(BC2>TC2,HP,LP),低点,高点,0,0),COLOR00FFFF; STICKLINE(IF(BC2>TC2,LP,HP),低点,高点,0,0),COLOR00FF00; DRAWNUMBER(EE AND FILTER(C=低点,TT),高点,高点),COLORYELLOW; DRAWNUMBER(EE AND FILTER(C=高点,TT),低点,低点),COLOR00FF00; DRAWNUMBER(EE AND FILTER(C=低点,TT),ZH,ZH),COLORFFFF00; DRAWNUMBER(EE AND FILTER(C=高点,TT),ZZ,ZZ),COLORWHITE; DRAWNUMBER(EE AND FILTER(C=高点,TT),ZL,ZL),COLOR0099FF; |
|