大神,能否帮忙写一个MACD指标中MACD的数值连续N天在正负0.1之间的选股工具,通达信软件

如题所述

第1个回答  2016-05-25
  DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
  DEA:=EMA(DIF,9);
  MACD:=(DIF-DEA)*2,COLORSTICK;
  TJ1:=BETWEEN(DIF,0.05,-0.05)AND BETWEEN(DEA,0.05,-0.05);
  TJ2:=REF(MACD,2)>0 AND BETWEEN(REF(MACD,1),-0.05,0.05)AND MACD>0;
  TJ3:=REF(MACD,2)>0 AND BETWEEN(REF(MACD,1),-0.05,0.05)AND MACD=REF(MACD,2);
  XG1:TJ1 AND TJ2;
  DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
  DEA:=EMA(DIF,9);
  MACD:=(DIF-DEA)*2,COLORSTICK;
  TJ1:=BETWEEN(DIF,0.05,-0.05)AND BETWEEN(DEA,0.05,-0.05);
  TJ2:=REF(MACD,2)>0 AND BETWEEN(REF(MACD,1),-0.05,0.05)AND MACD>0;
  TJ3:=REF(MACD,2)>0 AND BETWEEN(REF(MACD,1),-0.05,0.05)AND MACD=REF(MACD,2);
  XG2:TJ1 AND TJ3;追问

没有通过测试,暂时用不了呀。

本回答被网友采纳
相似回答