{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;
cci指标详解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 ,CLO
SE ,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) ),LINETHIC K2,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;
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论