WY:=1,NODRAW;
X_4:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
X_5:=SMA(X_4,4,1);
X_6:=SMA(X_5,2,1);
SM:IF(X_6<8.5 AND X_5<11 AND WY,13,0);
SMR:BARSLAST(SM=13 AND WY),NODRAW;
X_7:=REF(BARSLAST(SM=0 AND WY),SMR);
X_8:=REF(BARSLAST(SM=13 AND WY),SMR+X_7);
X_9:=REF(BARSLAST(SM=0 AND WY),SMR+X_7+X_8);
SMDAY:IFC(X_8<=3 AND WY,X_7+X_8+X_9,X_7),NODRAW;
QV:UNDERLYC,NODRAW;
QH:REF(HHV(HIGH,SMDAY+2),IF(SMR=0 AND WY,0,SMR-1)),NODRAW;