复合CCI通道飞狐源码
TYP:=(OPEN+HIGH+LOW+2*CLOSE)/5;
CC1:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));
SM:=MA(CC1,20),COLORFF00FF,LINETHICK0;
SU:=SM+2*STD(CC1,20),COLORFFFF00,LINETHICK0;
SD:=SM-2*STD(CC1,20),COLOR00FF00,LINETHICK0;
TR:=MA(MAX(MAX((CC1-CC1),ABS(REF(CC1,1)-CC1)),ABS(REF(CC1,1)-CC1)),15);
VM:=MA(CC1,6),COLORFF00FF,LINETHICK0;
VU:=VM+2.4*TR,COLORFFFFFF,LINETHICK0;
VD:=VM-2.4*TR,COLOR00FFFF,LINETHICK0;
FILLRGN(CLOSE>0,SU,SD)Colorbbcc00;{蓝色区域}
FILLRGN(CLOSE>0,VU,VD)Colorffffff;{白色区域}
DRAWTEXT(ISLASTBAR AND CC1>REF(CC1,1),VM,' ▲'),COLORDD00FF;
DRAWTEXT(ISLASTBAR AND CC1<REF(CC1,1),VM,' ▼'),COLORCCEE00;
MA1:MA(CC1,6),COLORLIBLUE;
MA2:MA(CC1,13),COLORBLUE,LINETHICK2;
CCI:CC1,COLORRED,LINETHICK2;
200,COLOR5A9A00;
0,COLOR9A9A9A;
-200,COLOR5A9A00;
20108274555398127.png
|