以下是通达信Z华盈趋势源码
MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2);
MA3:MA(CLOSE,M3);
MA4:=MA(CLOSE,M4);
VAR1:=HHV(HIGH,25);
VAR2:=LLV(LOW,25);
VAR3:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,20);
VAR4:=EMA((CLOSE-VAR2)/(VAR1-VAR2)*100,5);
VAR5:=CROSS(VAR4,VAR3);
DRAWTEXT(CROSS(VAR3,VAR4),HIGH+HIGH*0.1,'下降趋势'),COLORGREEN;
DRAWTEXT(CROSS(VAR4,VAR3) ,LOW-LOW*0.1,'上升趋势'),COLORYELLOW;
DRAWICON(CROSS(VAR3,VAR4) ,HIGH+0.5,2);
DRAWICON(CROSS(VAR4,VAR3) ,LOW-0.5,1);
STICKLINE(C<O,O,C,3,0),COLORFF6600;
STICKLINE(C<O,O,C,2,0),COLORFF9900;
STICKLINE(C<O,O,C,1.2,0),COLORFFCC00;
STICKLINE(C<O,O,C,0.2,0),COLORCYAN;
STICKLINE(C>O,O,C,3,0),COLOR000099;
STICKLINE(C>O,O,C,2,0),COLOR0000CC;
STICKLINE(C>O,O,C,1.3,0),COLOR0000FF;
STICKLINE(C>O,O,C,0.3,0),COLORCC66FF;