n:=250;n2:=34;p:=5;
dp1:ma(INDEXC/REF(INDEXC ,1 )-1,n)*100*n;
dp:=ma(INDEXC/REF(INDEXC ,1 )-1,p)*100*n;
dp2:ema(dp,n2),COLORF00FF0;
gg:=ma(c/REF(c ,1 )-1,p)*100*n;
gg2:ema(gg,n2),Color0000FF;
gg1:ma(c/REF(c ,1 )-1,n)*100*n;
STICKLINE( gg1>dp1 and gg2>dp2,gg2,dp1,0.8,1),colorred;
STICKLINE( gg1>dp1 and gg2>dp2,gg2,dp2,0.8,1),colorred;
STICKLINE( gg1>dp1 and gg2<dp2,gg1,gg2,0.8,1),coloryellow;
STICKLINE( gg1<dp1 and gg2>dp2,gg2,gg1,0.8,1),colorgreen;