在线检测未来函数

通达信趋势MACD买卖和选股指标公式

来源:Internet,编辑:股旁网,2010-05-24

趋势macd买卖副图源码
DIF1:=EMA(CLOSE,6) - EMA(CLOSE,13);
DEA1:=EMA(DIF1,5);
MACD1:=2*(DIF1-DEA1),STICK;
MACD2:EMA(MACD1,5)COLORWHITE;
蓝:STICKLINE(MACD1<MACD2 AND MACD1<0,0,MACD1,1,0),COLORBLUE;
粉:STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,1),COLORMAGENTA;
红:STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,1),COLORRED;
绿:STICKLINE(MACD1<MACD2 AND MACD1>0,0,MACD1,1,0),COLORGREEN;
A:DRAWTEXT(crOSS(粉,蓝),MACD1 -0.1,'买')COLORGREEN;
B:DRAWTEXT(CROSS(绿,红),MACD2 -0.01,'卖')COLORYELLOW;

通达信趋势MACD买卖和选股指标公式选股公式
去除ST股:=EXIST((C-REF(C,1))/REF(C,1)*100>5.6,100);{最近100日存在涨幅大于5.6}
去除停牌:=DYNAINFO(17)!=0;{量比不为0}
去除高低价:=DYNAINFO(7)>1 AND DYNAINFO(7)<10;{股价取1至10元}
去除大小盘股:=CAPITAL/1000000>1 AND CAPITAL/1000000<9; {流通盘取1至9亿}
净选:=去除ST股 AND 去除停牌 AND 去除高低价 AND 去除大小盘股;
DIF1:=EMA(CLOSE,6) - EMA(CLOSE,13);
DEA1:=EMA(DIF1,5);
MACD1:=2*(DIF1-DEA1);
MACD2:=EMA(MACD1,5)COLORWHITE;
蓝:=STICKLINE(MACD1<MACD2 AND MACD1<0,0,MACD1,1,0),COLORBLUE;
粉:=STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,1),COLORMAGENTA;
红:=STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,1),COLORRED;
绿:=STICKLINE(MACD1<MACD2 AND MACD1>0,0,MACD1,1,0),COLORGREEN;
买:=CROSS(粉,蓝);
选股:买 AND 净选;

相关文章