P1:=18;NH:=1;
CC:=(2*CLOSE+HIGH+LOW)/4;
KS:=BARSCOUNT(CLOSE)+2;
M:=IF(KS
DTZQ:INTPART(NH/GL+0.5),NODRAW;
T:=DTZQ;
V5:=EMA(V,0.5*T);
V10:=EMA(V,2*T);
D1:=V>REF(HHV(V,2),1) AND RANGE(V5,V10,V) AND UPNDAY(V5,2) AND UPNDAY(V10,2);
D2:=H>REF(HHV(H,2),1);
KMAX:=MAX(C,O);
D3:=KMAX>REF(HHV(KMAX,2),1);
DA:=D1 AND D2 AND D3;
PV1:=BArslAST(DA=1);
PV2:=REF(REF(H,1),PV1);
DB:=IF(DA,0,IF(C
QSX:EMA(EMA(C,21),T),LINETHICK1,COLORFF00FF;