文华财经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);
BB:=BACKSET(AA,N+1);
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;
//DRAWLINE1(CC,RSI1,FILTER(顶背离>0,5),RSI1,0),COLORGREEN;
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;{云析赢指标公式网,指标公式,指标源码,指标编写教程、指标破解指标论坛。www.zbgs518.com}
//DRAWLINE1(CC2,RSI1,FILTER(底背离>0,5),RSI1,0),COLORMAGENTA;
上升:IF(CCI>REF(CCI,1),CCI,NULL),DOT,LINETHICK1,COLORRED;
X:=CROSS(CCI,-100);
M:=CROSS(100,CCI);
IF(CCI>=100,CCI,NULL),COLORGREEN;
IF(CCI<=-100,CCI,NULL),COLORRED;
顶部:220*SJ,COLORRED,DOT;
底部:-220*SJ,COLOR00FF00,DOT;
STICKLINE(CCI>220,180,CCI,0.5,0), COLORGREEN;
STICKLINE(CCI<-220,-180,CCI,0.5,0), COLORRED;
YJD:=IFELSE(DATE+20000000>20210806,1,1);