VAR1:=EMA(C,3);
VAR2:=EMA(INDEXC,3);
VAR3:=SMA((VAR1-REF(VAR1,30))/REF(VAR1,30)*100,3,1);
VAR4:=SMA((VAR2-REF(VAR2,30))/REF(VAR2,30)*100,3,1);
VAR5:=EMA(VAR3-VAR4,2);
STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1,0),colorred;
STICKLINE(VAR5<=REF(VAR5,1),0,VAR5,1,0),colorgreen;
STICKLINE(VAR5>REF(VAR5,1) AND NOT(REF(VAR5>REF(VAR5,1),1)),VAR5/2,0,6,0),coloryellow;