N:=4;N1:=25;
VAR0:=EMA(EMA(EMA(CLOSE,N),N),N);
VAR1: VAR0-REF(VAR0,1)+VAR0;
VAR2: MA(VAR1,N1);
STICKLINE(VAR1 VAR2,VAR2,VAR1,0.1,1);
STICKLINE(VAR2 VAR1,VAR1,VAR2,0.1,1) , COLORGREEN;
DRAWTEXT(CROSS(VAR2,VAR1),VAR1*1.01,' 降'), , COLORGREEN;
DRAWTEXT(CROSS(VAR1,VAR2),VAR2*0.99,' 升'), , COLORYELLOW;