「翔博精选指标」CCI多空波段王(通达信公式 副图 源码 测试图)
2022-04-06原创 编 辑:翔博软件
CCI多空波段王,无未来函数
公式用法介绍:
只在200以上和-200以下进场把握高,指标很简单。
做空要等到涨到200以上,出绿线然后跌破200再进空。
做多要等到跌到-200以下,出红线然后涨破-200再进多。
{CCI多空波段王}
{CCI多空波段王}
SJ:=1;
N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
RSI1:=CCI;
AA:=REF(RSI1,N)=HHV(RSI1,2*N+1)*SJ;
BB:=BACKSET(AA,N+1)*SJ;
CC:=FILTER(BB,N) AND RSI1=HHV(RSI1,N+1);
A1:=BARSLAST(REF(CC,1));
{顶背离:REF(CLOSE,A1+1)<CLOSE AND REF(RSI1,A1+1)>RSI1 AND CC;}
{DRAWLINE(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORFF0000,LINETHICK2;}
{DRAWICON(顶背离,CCI*0.9,6);}
AA2:=REF(RSI1,N)=LLV(RSI1,2*N+1);
BB2:=BACKSET(AA2,N+1);
CC2:=FILTER(BB2,N) AND RSI1=LLV(RSI1,N+1);
A2:=BARSLAST(REF(CC2,1));
{底背离:REF(CLOSE,A2+1)>CLOSE AND REF(RSI1,A2+1)<RSI1 AND CC2;}
{DRAWLINE(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA,LINETHICK2;}
{DRAWICON(底背离,CCI*1.1,5);}
上升:IF(CCI>REF(CCI,1),CCI,DRAWNULL),LINETHICK1,COLORRED,DOTLINE;
X:=CROSS(CCI,-100);
{DRAWICON(X,-150,7);}
M:=CROSS(100,CCI);
{DRAWICON(M,150,8);}
IF(CCI>=100,CCI,DRAWNULL),COLORGREEN;
IF(CCI<=-100,CCI,DRAWNULL),COLORRED;
顶部:220*SJ,COLOR0000FF,LINETHICK1;
底部:-220*SJ,COLOR00FF00,LINETHICK1;
STICKLINE(CCI>220,180,CCI,0.5,0), COLORGREEN;
STICKLINE(CCI<-220,-180,CCI,0.5,0), COLORRED;