:=1;:=1;M1:=5;M2:=13;M3:=21;{}TC1S:=IF(H=HHV(H,48),H,DRAWNULL);TC2S:=CONST(BARSLAST(TC1S=H))+1;UPPERS:=CONST(IF(TC2S=1,H,REF(H,TC2S-1)));BC1S:=IF(L=LLV(L,48),L,DRAWNULL);BC2S:=CONST(BARSLAST(BC1S=L))+1;LOWERS:=CONST(IF(BC2S=1,L,REF(L,BC2S-1)));LPS:=CURRBARSCOUNT<=BC2S AND L=LOWERS;HPS:=CURRBARSCOUNT<=TC2S AND H=UPPERS;AB1S:=EMA(((2*C+H+L)/4-LLV(LOW,30))/ (HHV(HIGH,30)-LLV(LOW,30))*100,8); BA1S:=EMA(AB1S,5); 上轨:=REFDATE(REF(HHV(MAX(C,O),96),5),DATE); 下轨:=REFDATE(REF(LLV(MIN(C,O),96),5),DATE