{普通CCI值}
TYP:=(OPEN+HIGH+LOW+2*CLOSE)/5;
CC1:=(TYP-MA(TYP,21))/(0.015*AVEDEV(TYP,21));
{河道}
SM:=MA(CC1,20),COLORFF00FF,NODRAW;
SU:=SM+2*STD(CC1,20),COLORFFFF00,NODRAW;
SD:=SM-2*STD(CC1,20),COLOR00FF00,NODRAW;
TR:=MA(MAX(MAX((CC1-CC1),ABS(REF(CC1,1)-CC1)),ABS(REF(CC1,1)-CC1)),15);
VM:=MA(CC1,6),COLORFF00FF,NODRAW;
VU:=VM+2.4*TR,COLORFFFFFF,NODRAW;
VD:=VM-2.4*TR,COLOR00FFFF,NODRAW;
DRAWBAND(SU,RGB(0,170,140),SD,RGB(0,170,140));{蓝色区域}
DRAWBAND(VU,RGB(220,220,220),VD,RGB(220,220,220));{白色区域}
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;
{主力成本}
QJ1:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
周DIFF:="MACD.DIF#WEEK"(26,12,9) ;
周DEA:="MACD.DEA#WEEK"(26,12,9) ;
金叉:=CROSS(周DIFF,周DEA) ;
换手:=VOL*100/CAPITAL;
周期换手:SUM(换手,BARSLAST(金叉)),COLORYELLOW,NODRAW;
庄家控盘度:周期换手*0.133,COLORMAGENTA,NODRAW;
周期最高价:=HHV(H,周期换手);
周期最低价:=LLV(L,周期换手);
成本:=(周期最高价+周期最低价)/2,NODRAW;
第一目标:成本+(成本/2)+1,COLORGREEN,NODRAW;
股价:=EMA(QJ1,2),COLOR00DDFF,NODRAW;
主力成本:DMA(成本,VOL/CAPITAL),COLORFFBB00,NODRAW;
拉升:=CROSS(股价,主力成本);
DRAWTEXT(拉升 AND CC1<10,CC1,'拉升'),COLORBLACK;
{RSI基本数值}
LC:=REF(CLOSE,1);
RSI:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100,COLORWHITE,NODRAW;
{操作警示线}
0,POINTDOT,COLORYELLOW,LINETHICK1;
100,POINTDOT,COLORYELLOW,LINETHICK1;
-100,POINTDOT,COLORYELLOW,LINETHICK1;