BIAS0:= (C-MA(C,2))/MA(C,2)*100;
BIAS1 := (C-MA(C,12))/MA(C,12)*100;
BIAS2 := (C-MA(C,26))/MA(C,26)*100;
BIAS3 := (C-MA(C,48))/MA(C,48)*100;
hxl:=v/capital*100;
d1:=INDEXC;
d2:=MA(d1,13);
dr2:=d2>1.050*d1;
E1:=(C-hhv(c,12))/hhv(c,12)*10;
E2:=(C-REF(c,26))/REF(c,26)*10;
e3:=ma(c,3);
sj1:=dr2;
sj2:=e2<-2.30;
sj3:=bias0<-2.7;
sj5:=sj1 and sj2 and sj3;
sj6:=cross(0.5,sj5);
js1:=cross(sj6,0.5);js2:=barslast(js1=1);
js3:=js2<=5 and c<ref(c,js2);
sj6 or js3;