金通道
DRAWGBK(O>C,RGB(360,0,10),RGB(10,0,1),0,'01',0);
上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;
DRAWBAND(上18H,RGB(0,0,155),通道,RGB(0,0,155));
DRAWBAND(通道,RGB(0,40,0),下18L,RGB(0,40,0));
WMA(SMA(HHV(HIGH,18),9/2,1),3),COLOR00FF00;
WMA(SMA(LLV(LOW,18),9/2,1),3),COLOR009900;
(上18H+下18L)/2,COLOR0598FF;
MA5:WMA(C,5);
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLORRED,LINETHICK3;
{CCI-金}
现价:IF (DYNAINFO(4)=0,C,DYNAINFO(7)),COLOR0077FF,LINETHICK0;
TYB:WMA(((C+(H+L)/2)/2*0.618+(C+O)/2*0.382),2),LINETHICK0;
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);
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+现价,COLOR00FF00,DOTLINE;
IF(CCIK>REF(CCIK,1),CCIK,DRAWNULL),COLOR00FFFF,LINETHICK3;
DRAWTEXT(CCI>REF(CCI,1) AND CROSS(CCI,-100),CCIK,'CCI底背离'),COLOR00FFFF;
{高抛.低吸}
RC:=(H+L+C*2)/4;
R2D:=WMA(RC,27);
R2E:=STD(RC,27);
R3F:=(RC-R2D)/R2E*100;
R40:=WMA(R3F,3);
R41:=WMA(R40,3);
JD:=WMA(R41,2);
AJ:=3*R41-2*JD;
DRAWTEXT(CROSS(AJ,JD) ,L-0.1,'★'),COLOR00FFFF,LINETHICK1;
DRAWTEXT(CROSS(JD,AJ) ,H+0.1,'★'),COLORFFFF00,LINETHICK1;
{K线}
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.0,0),COLORRED;
STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0.0,0),COLORCYAN;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
附件里的公式,适合通达信公式管理器5.0版本 |