N:=12;
M:=5;
VAR1:=(HIGH+3*LOW+CLOSE)/5;
VAR2:=MA(VAR1,13)-MA(VAR1,34);
VAR3:=MA(VAR2,5);
VAR4:=(VAR2-VAR3)*5;
VAR5:=IF(VAR4>=1000,1000,IF(VAR4<=VAR1,VAR1,VAR4));
VAR6:=(MA(MA(VAR5,N),M)+VAR4);
上涨: IF(VAR5>VAR6,VAR5,VAR6),COLORRED;
下跌: IF(VAR5<VAR6,VAR5,VAR6),COLORGREEN;
分水岭:(MA(MA(VAR5,N),M)+VAR4),LINETHICK1 , COLORMAGENTA;