通达信自编看趋势的指标--趋势跟踪
发一个自编看趋势的指标----------趋势跟踪
本指标结合均线和sar,红持股,绿持币,看趋势简单明了,希望大家喜欢!
MID:=(HIGH+LOW+OPEN+CLOSE)/4;
MA5:MA(MID,5);
IF(MA5>REF(MA5,1) AND C>SAR(4,2,20),MA5,DRAWNULL),COLORRED,LINETHICK1;
IF(NOT(MA5>REF(MA5,1) AND C>SAR(4,2,20)),MA5,DRAWNULL),COLORCYAN,LINETHICK1;
STICKLINE(MA5>REF(MA5,1) AND C>SAR(4,2,20) AND C<O,C,O,3,0),COLORRED;
STICKLINE(MA5>REF(MA5,1) AND C>SAR(4,2,20) AND C<O,H,L,0,0),COLORRED;
STICKLINE(NOT(MA5>REF(MA5,1) AND C>SAR(4,2,20)) AND C>O,H,L,0,0),COLORCYAN;
STICKLINE(NOT(MA5>REF(MA5,1) AND C>SAR(4,2,20)) AND C>O,C,O,3,1),COLORCYAN;
DRAWTEXT(ISLASTBAR AND MA5>REF(MA5,1) AND C>SAR(4,2,20),MA5,'满仓'),COLORRED;