LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
KA:=EMA(RV,3);
QFR:=MA(KA,3);
DIFF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIFF,5);
A1:=DIFF>DEA;
RSV1:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
K:=SMA(RSV1,3,1);
D:=SMA(K,3,1);
A2:=K>D;
LC:=REF(CLOSE,1);
rsi1:=(SMA(MAX(CLOSE-LC,0),5,1))/(SMA(Abs(CLOSE-LC),5,1))*100;
RSI2:=(SMA(MAX(CLOSE-LC,0),13,1))/(SMA(ABS(CLOSE-LC),13,1))*100;
A3:=RSI1>RSI2;
RSV:=-(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*100;
Lwr1:=SMA(RSV,3,1);
LWR2:=SMA(LWR1,3,1);
A4:=LWR1>LWR2;
A5:=CLOSE>bbi;
mms:=100*EMA(EMA(mtm,5),3)/EMA(EMA(ABS(MTM),5),3);
MMM:=100*EMA(EMA(MTM,13),8)/EMA(EMA(ABS(MTM),13),8);
A6:=MMS>MMM;
JG:=IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6,6,0);
XG:BArslASTCOUNT(JG=6)=2 AND CLOSE>OPEN AND QFR<55;