以下是通达信CCI买入法指标公式(无源码的请下载附件导入)
DRAWGBK(C>O,RGB(60,0,0),RGB(0,0,0),1,2,1);
DRAWKLINE(H,O,L,C);
A1:EMA(C,3),COLORWHITE;
A2:EMA(C,5),COLORYELLOW;
A3:EMA(C,7),COLORBROWN;
N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
今日量:=CCI*1.01-REF(CCI,1)*0.99,NODRAW;{K线柱大小}
昨日量:=REF(CCI*1.01,1)-REF(REF(CCI,1)*0.99,1),NODRAW;
注意了:=REF(CCI,1)<50 AND 今日量>70;
买点:=FILTER(注意了,2);
DRAWTEXT(买点,L-0.04,' 买点'),COLORMAGENTA;
DRAWICON(买点,L-0.04,5);
风险:=CCI>180;
TT:=FILTERX(风险,4);
DRAWTEXT(TT,H,' 风险'),COLORMAGENTA;
DRAWICON(TT,H,2);
656366117.jpg
|