当前位置: 爱约股 > 通达信答疑 > > 把下面追涨和底背离两个指标分别改为龙回头等选股公式
把下面追涨和底背离两个指标分别改为龙回头等选股公式
来源:Internet,编辑:爱约股,2012-10-20
编写要求:
请老师把下面2个指标改为选股公式 1. TT:=DCLOSE-CLOSE; XG1:=C>REF(C,1)AND TT>=REF(TT,1) AND TT/C>=0.1; XG2:=REF(XG1,1)=1 AND C/REF(C,1)CLOSE AND DIFFV>REF(DIFFV,A1V+1) AND CROSS(DIFFV,DEAV); DEA0:=EMA(DIFFV*100,9); MACD0:=2*(DIFFV*100-DEA0); 黑马:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15); LHT:=底背离 AND 黑马; DRAWTEXT(LHT,REF(CLOSE,1)*0.78,'龙回头'),COLORLIBLUE;
爱约股解答:
【第一个:DCLOSE不定周期收盘价——未来函数】
TT:=DCLOSE-CLOSE;
XG1:=C>REF(C,1)AND
TT>=REF(TT,1) AND TT/C>=0.1;
XG2:REF(XG1,1)=1 AND
C/REF(C,1)<1.05;
【第二个:DCLOSE不定周期收盘价——未来函数】
DIFFV:=EMA(DCLOSE,9)-EMA(DCLOSE,27);
DEAV:=EMA(DIFFV,5);
A1V:=CROSS(DIFFV,DEAV);
底背离:=REF(CLOSE,A1V+1)>CLOSE
AND DIFFV>REF(DIFFV,A1V+1) AND
CROSS(DIFFV,DEAV);
DEA0:=EMA(DIFFV*100,9);
MACD0:=2*(DIFFV*100-DEA0);
黑马:=(MACD0>REF(MACD0,1)*2.5
AND MACD0>15);
LHT:底背离 AND 黑马;