P1:=5;
P2:=10;
P3:=20;
P4:=30;
P5:=60;
P6:=250;
MA1:MA(CLOSE,P1);
MA2:MA(CLOSE,P2);
MA3:MA(CLOSE,P3);
MA4:MA(CLOSE,P4);
MA5:MA(CLOSE,P5);
MA6:MA(CLOSE,P6);
VAR1:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR2:=(100-((90*(HHV(HIGH,14)-CLOSE))/(HHV(HIGH,14)-LLV(LOW,14))));
VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DIR1:=ABS(CLOSE-REF(CLOSE,5));
VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);
STICKLINE(VAR2<MA(VAR3,6),LOW,HIGH,0,1);
STICKLINE(VAR2>MA(VAR3,6),LOW,HIGH,0,1),COLORRED;
STICKLINE(((OPEN>CLOSE)AND(VAR2<MA(VAR3,6))),(CLOSE-0.03),OPEN,2.9,0),COLORCYAN;
STICKLINE(((OPEN<CLOSE)AND(VAR2<MA(VAR3,6))),CLOSE,OPEN,2.9,1),COLORCYAN;
STICKLINE(((OPEN>CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,(CLOSE-0.03),2.9,0),COLORRED;
STICKLINE(((OPEN<CLOSE)AND(VAR2>MA(VAR3,6))),OPEN,CLOSE,2.9,1),COLORRED;
DRAWICON(CROSS(VAR2,MA(VAR3,2)),(LOW-(LOW*0.02)),7);
DRAWICON(CROSS(MA(VAR3,2),VAR1),(HIGH+(HIGH*0.02)),8);