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);