通达信双均线买入卖出主图指标公式
2021/1/7 18:21:26
M1:=13;
M2:=5;
MA1:MA(CLOSE,M1);{设定均线}
MA2:=MA(CLOSE,M2);{设定均线}
DRAWKLINE(H,O,L,C);{写K线}
STICKLINE(MA1>=REF(MA1,1),H,L,0,0),COLOR0000FF;{均线上行,标记影线}
STICKLINE(MA1>=REF(MA1,1) AND (C>=O),O,C,3,1),COLOR0000FF;{均线上行,标记阳线}
STICKLINE(MA1>=REF(MA1,1)AND (C<=O),O,C,3,0),COLOR0000FF;{均线上行,标记阴线}
STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13,H,L,0,0),COLOR00FFFF;{做顶,标记影线}
STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C>=O),O,C,3,1),COLOR00FFFF;{做顶,标记阳线}
STICKLINE(MA1>=REF(MA1,1) AND MA2<=REF(MA2,1) AND COUNT(MA1>=REF(MA1,1),20)>13 AND (C<=O),O,C,3,0),COLOR00FFFF;{做顶,标记阴线}
STICKLINE(MA1<REF(MA1,1),H,L,0,0),COLOR00FF00;{均线下行,标记影线}
STICKLINE(MA1<REF(MA1,1) AND (C>=O),O,C,3,1),COLOR00FF00;{均线下行,标记阳线}
STICKLINE(MA1<REF(MA1,1) AND (C<=O),O,C,3,0),COLOR00FF00;{均线下行,标记阴线};
STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15,H,L,0,0),COLORFF00FF;{做底,标记影线}
STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C>=O),O,C,3,1),COLORFF00FF;{做底,标记阳线}
STICKLINE(MA1<=REF(MA1,1) AND MA2>=REF(MA2,1) AND COUNT(MA1<=REF(MA1,1),30)>15 AND (C<=O),O,C,3,0),COLORFF00FF;{做底,标记阴线};
投股票 网 w ww.tou18.cn
股市公式下载推荐