VAR1:=(2*CLOSE+OPEN)/3;
VAR2:=(CLOSE-MA(CLOSE,2))/MA(CLOSE,2)*100;
VAR3:=(MA(VAR2,1)+MA(VAR2,3)+MA(VAR2,6))/2;
A1:=MA(VAR3,2);
A2:=MA(A1,2);
A3:=MA(A2,2);
STICKLINE((A1 >= A3),A1,A3,4,1),COLORRED;
STICKLINE((A1 <= A3),A1,A3,4,1),COLORGREEN;
0;
3;
-3;