大智慧RSI核心指标公式,大智慧KDJ+CCI指标公式
admin888
|大智慧RSI核心指标公式,大智慧KDJ+CCI指标公式
大智慧RSI核心指标公式
input:n(10,1,30),p(9,1,21);
0,DOTLINE,colorwhite;
50,DOTLINE,colorwhite;
-20,DOTLINE,color000099;
-50,DOTLINE,colorwhite;
{rsi差比}gc:=close;
比c:=ema(gc/"SH000001$CLOSE"*1000,3);
比LC:= REF(比c,1);
比RSI1:=SMA(MAX(比c-比LC,0),6,1)/SMA(ABS(比c-比LC),6,1)*100;
比RSI:=eMA(比RSI1,n)-50;
比RSEA:=EMA(比RSI,p);
STICKLINE(比RSI0,0,比RSI,6,0),color777777;
STICKLINE(比RSI>ref(比RSI,1)and 比RSI<0,0,比RSI,6,0),COLOR777777;
STICKLINE(比RSI>ref(比RSI,1)and 比RSI>0,0,比RSI,6,0),COLOR999999;
{个股多空}TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
多:=DMP*100/TR-50;
空:=DMM*100/TR-50;
差值:多-空,linethick0,color00cc33;
STICKLINE( 差值>=0,-50 ,差值-50,4 ,0 ),COLORCC0099;
STICKLINE( 差值<0,-50 ,差值-50,4 ,0 ),COLOR336666;
{RSI}LC := REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100-100,LAYER0;
RSI2:SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100-100,LAYER0;
RSI3:SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100-100,LAYER0;
{RSI压力支撑}TY:=RSI1;
AA:=REF(TY,5)=HHV(TY,2*5+1);
BB:=BACKSET(AA,5+1);
CC:=FILTER(BB,5) AND TY=HHV(TY,5+1);
AA2:=REF(TY,5)=LLV(TY,2*5+1);
BB2:=BACKSET(AA2,5+1);
CC2:=FILTER(BB2,5) AND TY=LLV(TY,5+1);
GG:=BARSTATUS=2 AND REF(CC,BARSLAST(CC));
HH:=BACKSET(GG,BARSLAST(CC)+1);
II:=HH>REF(HH,1);
JJ:=REF(BARSLAST(CC),1);
KK:=BACKSET(II,JJ+2);
LL:=KK>REF(KK,1);
DRAWLINE(LL,TY,II,TY,1),COLORblue,DOTLINE;
CS:=(REF(TY,BARSLAST(II))-REF(TY,BARSLAST(LL)))/(BARSLAST(LL)-BARSLAST(II));
阻力线:=REF(TY,BARSLAST(II))+BARSLAST(II)*CS;
阻力值:阻力线,LINETHICK0;
DRAWICON(CROSS(TY,阻力线),阻力线*0.99,12);
阻力点:阻力线*0.99,linethick0;
GG2:=BARSTATUS=2 AND REF(CC2,BARSLAST(CC2));
HH2:=BACKSET(GG2,BARSLAST(CC2)+1);
II2:=HH2>REF(HH2,1);
JJ2:=REF(BARSLAST(CC2),1);
KK2:=BACKSET(II2,JJ2+2);
LL2:=KK2>REF(KK2,1);
DRAWLINE(LL2,TY,II2,TY,1),COLORblue,DOTLINE;
{RSICD}RSI: eMA(RSI1,n)+50;
RSEA : EMA(RSI,p);
RSCD:2*(RSI-RSEA),linethick0;
bbRSI:=RSI-ref(RSI,1);
bbRSEA:=RSEA-ref(RSEA,1);
bbRSCD:=RSCD-ref(RSCD,1);
PARTLINE(bbRSI>0,RSI),color0066ff,LINETHICK2;
PARTLINE(bbRSI<0,RSI),colorcyan,LINETHICK2;
PARTLINE(bbRSEA>0,RSEA),colormagenta,LINETHICK2;
PARTLINE(bbRSEA<0,RSEA),color009999,LINETHICK2;
RSI速率:=bbRSI*100;
RSEA速率:=bbRSEA*100;
RSCD速率:=bbRSCD*100;
{KD}RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1);
D:SMA(K,3,1);
bbK:=K-ref(K,1);
bbD:=D-ref(D,1);
PARTLINE(bbD>0,D),coloryellow,LINETHICK2;
PARTLINE(bbD<=0,D),color00ff33,LINETHICK2;
PARTLINE(bbK>0,K),colorcc00ff,LINETHICK2;
PARTLINE(bbK<=0,K),colorwhite,LINETHICK2;
K速率:bbK*100,LINETHICK0;
D速率:bbD*100,LINETHICK0;
大智慧KDJ+CCI指标公式
DRAWGBKlAST(C>0,strip(RGB(0,0,100),RGB(30,0,30),0));
0,COLORff9900;
{KDJ9}var9:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(var9,3,1);
D:SMA(K,3,1),COLOR00FF00,DOTLINE,LINETHICK0;
J:(3*K-2*D),COLOR0000FF,LINETHICK0;
PARTLINE(J*1.5,J*1.5>REF(J*1.5,1),rgb(255,50,0),J*1.5<=REF(J*1.5,1),rgb(0,150,150) ),LINETHICK2,LAYER0;
{大盘KDJ}{DRSV:=(INDEXC-LLV(INDEXL,9))/(HHV(INDEXH,9)-LLV(INDEXL,9))*100;
DK:=SMA(DRSV,3,1);
DD:=SMA(DK,3,1);
DJ:(3*DK-2*DD),COLORFF44FF,DOTLINE,LINETHICK0;
DJK:(3*DK-2*DD)*1.5,DOTLINE,LINETHICK0;
PARTLINE(DJK,(DJ*1.5>REF(DJK,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),DOTLINE,LINETHICK1,LAYER1;
PARTLINE(DJK,(DJ*1.5>REF(DJK,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),POINTDOT,LINETHICK6,LAYER4;
}{CCI}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,3);
PARTLINE(CCI,CCI>REF(CCI,1),rgb(255,0,0),CCI<=REF(CCI,1),rgb(0,255,0) ),LINETHICK3;
{大盘CCI}TYBDP:= (INDEXH + INDEXL + 2*INDEXC)/4;
CCIADP:=(TYBDP-MA(TYBDP,14))/(0.015*AVEDEV(TYBDP,14));
CCIBDP:=(TYBDP-MA(TYBDP,28))/(0.015*AVEDEV(TYBDP,28));
CCICDP:=(TYBDP-MA(TYBDP,42))/(0.015*AVEDEV(TYBDP,42));
CCIDP:=WMA((CCIADP*2+CCIBDP+CCICDP)/4,3);
PARTLINE(CCIDP,(CCIDP>REF(CCIDP,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),DOTLINE,LINETHICK1,LAYER1;
PARTLINE(CCIDP,(CCIDP>REF(CCIDP,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),POINTDOT,LINETHICK6,LAYER4;
XS:FORCAST(((1-BIGORDER(1,1))-(1-BIGORDER(2,1))),5)*1000,LINETHICK0;
{小于4万元---反向用}STICKLINE(XS<0 ,CCI ,CCI-XS,2,0) ,COLOR0099FF,LAYER0;
STICKLINE(XS>0 ,CCI ,CCI-XS,2,0) ,COLORFF9946,LAYER0;
净额主:(bigorder(1,2)-bigorder(2,2))*AMOUNT/10000,linethick0;
DRAWTEXT(BARSTATUS=2,CCI,'【' +NUMTOSTRN(净额主,1)+'万】'),ALIGN0,COLOR00FFFF,LINETHICK3,LAYER0;
{高抛低吸}SJ:=WMA(((2*C+H+L)/4-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
ZJ:=WMA(0.618*REF(SJ,1)+0.382*SJ,2);
DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,-20, ' ▲吸'),ALIGN1,COLOR00FF00,LINETHICK2;
DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,120, ' ▲抛'),ALIGN1,COLOR0000FF,LINETHICK2;
{BOLL顶底}MID:=WMA(TYB,18);
UPPER:=MID + 2*STD(TYB,18);
LOWER:=MID - 2*STD(TYB,18);
布顶:STICKLINE(cross(C,UPPER) ,60 ,100 ,8 , 0),color0000FF;
DRAWTEXT(CROSS(C,UPPER) ,90, '顶'),ALIGN1,COLOR00FFFF,LINETHICK1;
布底:STICKLINE(cross(C,LOWER) ,-60 ,-100 ,8 , 0),colorFF9900;
DRAWTEXT(CROSS(C,LOWER) ,-70, '底'),ALIGN1,COLOR00FFFF,LINETHICK1;
倍量:STICKLINE(V>REF(V,1)*2 ,0 ,30 , 8, 1),color00ffff;
DRAWTEXT(V>REF(V,1)*2 ,20, '倍'),ALIGN1,COLOR00FFFF,LINETHICK1;
{标记BSI.KDJ}LC:=REF(C,1);
RSI:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(DISPSTATUS=2,150,'【RSI:'+NUMTOSTRN(RSI,0)+'】'),COLOR00FFFF,LINETHICK2,ALIGN1;
DRAWTEXT(DISPSTATUS=2,120,'【J:'+NUMTOSTRN(J,1)+'】'),COLOR00FF00,LINETHICK2,ALIGN1;
牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。