X_1:=SUM(vol,2)/((HHV(HIGH,2)-LLV(LOW,2))*100); X_2:=(CLOSE-REF(CLOSE,1))*X_1; X_3:=SUM(X_2,0); XG1:=X_3>MA(X_3,30); XG:XG1 AND REF(XG1,1)=0;