设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

通达信指标公式 揭开主力的操盘手法MACD指标公式

2015-4-8 11:27:42 股票入门 http://rumen.southmoney.com

  通达信指标公式 揭开主力操盘手法MACD指标公式:

  DIF:EMA(CLOSE,12)-EMA(CLOSE,26);

  DEA:EMA(DIF,9);

  MACD:(DIF-DEA)*2,COLORSTICK;

  N:=BARSLAST(CROSS(DEA,0));

  VAR1:=LLV(DEA,N-2)》0 AND SUM(IF(REF(CROSS(DEA,DIF),1),1,0),N)=0 AND CROSS(DEA,DIF);

  N1:=BARSLAST(VAR1);

  VAR2:=LLV(DEA,N-2)》0 AND SUM(IF(REF(CROSS(DEA,DIF),1),1,0),N)=1 AND CROSS(DEA,DIF);

  N2:=BARSLAST(VAR2);

  减持:=VAR2 AND REF(DEA,N2+1)》REF(DEA,N1+1);

  大减:=VAR2 AND REF(DEA,N2+1)《REF(DEA,N1+1) AND REF(C,N2+1)《REF(C,N1+1);

  清仓:=VAR2 AND REF(DEA,N2+1)《REF(DEA,N1+1) AND REF(C,N2+1)》REF(C,N1+1);

  BB1:=减持 OR 大减 OR 清仓;

  DRAWTEXT(减持,DEA+0.02,‘减持’),COLORGREEN;

  DRAWTEXT(大减,DEA+0.02,‘大减’),COLORCYAN;

  DRAWTEXT(清仓,DEA+0.02,‘清仓’);

  小N:BARSLAST(BB1),NODRAW;

  YQXC:=SUM(IF(CROSS(0,DEA),1,0),小N)=1;

  NN:BARSLAST(CROSS(0,DEA)),NODRAW;

  VARB1:=HHV(DEA,NN-2)《0 AND SUM(IF(REF(CROSS(DIF,DEA),1),1,0),NN)=0 AND CROSS(DIF,DEA);

  NN1:BARSLAST(VARB1),NODRAW;

  VARB2:=HHV(DEA,NN-2)《0 AND SUM(IF(REF(CROSS(DIF,DEA),1),1,0),NN)=1 AND CROSS(DIF,DEA);

  NN2:BARSLAST(VARB2),NODRAW;

  增持:=VARB1 AND YQXC=1;

  全仓:=VARB2 AND REF(DEA,NN2+1)》REF(DEA,NN1+1) AND YQXC=1;

  开仓:=IF(全仓,0,VARB2 AND REF(DEA,NN2+1)》REF(DEA,NN1+1));

  DRAWTEXT(增持,DEA-0.05,‘增持’),COLORRED;

  DRAWTEXT(全仓,DEA-0.05,‘全仓’),COLORMAGENTA;

  DRAWTEXT(开仓,DEA-0.05,‘开仓’),COLORYELLOW;

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。