同花顺自用CCI2副图指标
源码
TYP:=(HIGH+LOW+CLOSE)/3; CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)); MACCI:MA(CCI,5); DRAWTEXT(COUNT(CCI =-150,13) =1 AND CROSS(CCI,100),CCI,'减1/3'),colorwhite; DRAWTEXT(COUNT(CCI =180,13) =1 AND CROSS(-100,CCI),CCI,'增1/3'),colorred; AA1:=COUNT(CCI =0,34) =33 AND CROSS(0,CCI); DRAWTEXT(AA1,CCI,'转弱'),colorgreen; AA2:=COUNT(CCI =0,34) =33 AND CROSS(CCI,0); DRAWTEXT(AA2,CCI,'转强'),colormagenta; DRAWICON(BARSLAST(AA1) =13 AND CROSS(CCI,180),CCI,2); DRAWICON(BARSLAST(AA2) =13 AND CROSS(-150,CCI),CCI,1); CCI1:(TYP-MA(TYP,34))/(0.015*AVEDEV(TYP,34)); DRAWTEXT(CROSS(CCI1,0),CCI1,'中线强'),coloryellow; DRAWTEXT(CROSS(0,CCI1),CCI1,'中线弱'),colorblue;