VAR1:=(3*CLOSE+HIGH+LOW+OPEN)/6;
VAR2:=8*VAR1+7*REF(VAR1,1)+6*REF(VAR1,2);
VAR3:=VAR2+5*REF(VAR1,3)+4*REF(VAR1,4);
VAR4:=VAR3+3*REF(VAR1,5)+2*REF(VAR1,6);
VAR8:=(VAR4+REF(VAR1,7))/36;
VAR9:=(LLV(VAR8,3)+LLV(VAR8,5)+LLV(VAR8,8))/3;
XG:VAR8>VAR9 AND NOT(REF(VAR8>VAR9,1));