CCI是最常用的指标.把他加到主图上.用一个图.同时看到CCI和K线的关联.充分有利于买卖股票.对于防止被套和买入不及时都十分有利.同时我们用得是长短结合的CCI比单独使用14天.更能说明问题.再配合【二九通道】【高抛.低吸】【五天均线转折】这四个指标结合在一起就可以【做到天衣无缝】了.公式这个参谋是你买卖股票必须参考的.没有一个好用的参谋补助你.你能下决心买卖股票吗.但是参谋仅仅是参谋.说了算的还是你自己.大策略.大智慧.最后大脑发号施令还是你.
{CCI-金}
DRAWGBKlast(DATE>900101,strip(RGB(0,0,255),RGB(40,0,0),0));
{K线}
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,0,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,0,0),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR006600;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000EE;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
MA5:WMA(C,5),PRECIS2;
PARTLINE(ma5,(ma5>REF(ma5,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK2,LAYER0;
{CCI-金}
现价:if (DYNAINFO(4)=0,C,DYNAINFO(7)),color0077FF,linethick0;
TYB:= (HIGH + LOW + 2*CLOSE)/4;
CCIA:=(TYB-MA(TYB,14))/(0.015*AVEDEV(TYB,14));
CCIB:=(TYB-MA(TYB,28))/(0.015*AVEDEV(TYB,28));
CCIC:=(TYB-MA(TYB,42))/(0.015*AVEDEV(TYB,42));
CCI:=WMA((CCIA+2*CCIB+CCIC)/4,5);
{叠加前N天显示图象}
N:=100;
W:=barslast(cross(BACKSET(BARSTATUS=2,N),0)); {叠加区间(从最后周期往前N天)}
J:=W*0; {只在叠加区间才显示图象}
PK:=4;
BX:=IF(BARSCOUNT(C)=500,0,500);
CCIS:=abs(hhv(CCI,BX)-llv(CCI,BX))/(HHV(C,BX)-llv(C,BX))*PK;
CCIK:CCI/CCIS+现价+J,COLOR00FF00,LAYER0;
PARTLINE(CCIK,CCIK>REF(CCIK,1),rgb(255,200,0) ),LINETHICK3,LAYER0;

{二九宽带}
上18H:WMA(SMA(hhv(HIGH,18),9/2,1),3),COLOR00FF00;
下18L:WMA(SMA(llv(LOW,18),9/2,1),3),COLOR009900;
通道:(上18H+下18L)/2,COLOR0598FF;
FILLRGN(上18H,通道,上18H>通道,RGB(60,0,60)),LAYER7;
FILLRGN(下18L,通道,下18L<通道,RGB(0,40,0)),LAYER7;

{高抛.低吸}
LC := REF(CLOSE,1);
RSI:=WMA(SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,3);
RSI5:=WMA(RSI,8);
DRAWTEXT(CROSS(RSI,RSI5) ,L-0.1,’←低吸’),COLOR00fffF,LINETHICK1;
DRAWTEXT(CROSS(RSI5,RSI) ,H+0.1,’←高抛’),COLOR0099FF,LINETHICK1;

XP:=BARSLAST(DISPSTATUS=1)+1;
AH1:hhv(h,Xp),COLOR0077FF,DOTLINE,LINETHICK1;
AL2:llv(l,Xp),COLORFF9900,DOTLINE,LINETHICK1;
HLZ:(AH1+AL2)/2,COLOR00FFFF,DOTLINE,LINETHICK1;
下跌:LAST(AH1>H),PRECIS0 ,LINETHICK0;
上涨:LAST(Al2<L),PRECIS0 ,LINETHICK0;
DRAWTEXT(DISPSTATUS=2,AH1,’—-【’+NUMTOSTRN(AH1,2)+’元:跌’+NUMTOSTRN((C-AH1)/AH1*100,1)+’%.’+NUMTOSTRN(下跌,0)+’天】—- ‘),ALIGN1,Color00FFFF,linethick3,LAYER0;
DRAWTEXT(DISPSTATUS=2,Al2,’—-【’+NUMTOSTRN(AL2,2)+’元:涨’+NUMTOSTRN((C-AL2)/AL2*100,1)+’%.’+NUMTOSTRN(上涨,0)+’天】—- ‘),ALIGN1,VALIGN2,Color00ff00,linethick3,LAYER0;
 


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。