P1:=5;
P2:=4;
VARA:=LLV(LOW,P1);
VARB:=HHV(HIGH,P1);
K:=EMA((CLOSE-VARA)/(VARB-VARA)*100,P2);
D:=EMA(0.667*REF(K,1)+0.333*K,2);
XG:crOSS(K,D)AND D<40;
P1:=5;
P2:=4;
VARA:=LLV(LOW,P1);
VARB:=HHV(HIGH,P1);
K:=EMA((CLOSE-VARA)/(VARB-VARA)*100,P2);
D:=EMA(0.667*REF(K,1)+0.333*K,2);
XG:crOSS(K,D)AND D<40;