通达信指标公式源码顺势而为主图指标
MA2:=MA((CLOSE+HIGH+LOW)/3,4);
MA1
IF(MA1 < REF(MA1,1),MA1,DRAWNULL),COLORMAGENTA,COLORGREEN;
MA3:IF(MA2 >=MA1,MA2,MA1),COLORGREEN;
MA60:MA(C,60),DOTLINE,COLORLIMAGENTA;
MA156:MA(C,156),COLORLIMAGENTA,LINETHICK2;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 >=REF(MA2,1),C,O,3,1) ,COLORRED;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 >=REF(MA2,1),H,MAX(C,O),0,0) ,COLORRED;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 >=REF(MA2,1),L,MIN(C,O),0,0) ,COLORRED;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 < REF(MA2,1),C,O,3,1) ,COLORWHITE;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 < REF(MA2,1),H,MAX(C,O),0,0) ,COLORWHITE;
STICKLINE(MA1 >=REF(MA1,1) AND MA2 < REF(MA2,1),L,MIN(C,O),0,0) ,COLORWHITE;
STICKLINE(MA1 < REF(MA1,1) AND MA2 < REF(MA2,1),C,O,3,1) ,COLORWHITE;
STICKLINE(MA1 < REF(MA1,1) AND MA2 < REF(MA2,1),H,MAX(C,O),0,0) ,COLORWHITE;
STICKLINE(MA1 < REF(MA1,1) AND MA2 < REF(MA2,1),L,MIN(C,O),0,0) ,COLORWHITE;
STICKLINE(MA1 < REF(MA1,1) AND MA2 >=REF(MA2,1),C,O,3,1) ,COLORGREEN;
STICKLINE(MA1 < REF(MA1,1) AND MA2 >=REF(MA2,1),H,MAX(C,O),0,0) ,COLORGREEN;
STICKLINE(MA1 < REF(MA1,1) AND MA2 >=REF(MA2,1),L,MIN(C,O),0,0) ,COLORGREEN;
(MA(CLOSE,28)+MA(CLOSE,22)+MA(CLOSE,20)+MA(CLOSE,30))/4,COLORMAGENTA;
IF(MA1 < REF(MA1,1),MA1,DRAWNULL),COLORMAGENTA,COLORGREEN;
IF(MA2 >=MA1,MA2,MA1),COLORGREEN;
风险提示:本指标公式仅作为知识分享,不构成任何投资建议,不作投资依据。
=====================