当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码精选:发现主力意图,各种撑压分析,KD罗威高低档

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

1、发现主力意图

{发现主力意图}

N1:=34; N2:=9; N3:=3; 
X1:=100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));
VAR1:=100*(HHV(HIGH,N2)-CLOSE)/(HHV(HIGH,N2)-LLV(LOW,N2));
VAR2:=100*(HHV(HIGH,N3)-CLOSE)/(HHV(HIGH,N3)-LLV(LOW,N3));
VAR3:=VAR1-X1;
VAR4:=X1-VAR1;
STICKLINE(VAR3<0,0,VAR4,3,1),COLOR99FFFF;
游资暗中建仓:VAR3<0,COLOR99FFFF;
STICKLINE(VAR4<0,0,VAR3,3,1),COLORD9D919;
机构暗中吸筹:VAR4<0,COLORD9D919;
 
VAR5:=DYNAINFO(5);
VAR6:=IF(HIGH<VAR5,0,IF(LOW>VAR5,1,(VAR5-HIGH+0.009)/(LOW-HIGH+0.009)));
A:=CLOSE*1.1;
B:=CLOSE*0.9;
B1:=100*(WINNER(A)-WINNER(B));
CMSD:=100-B1;
C1:=MA(CLOSE,13)<REF(MA(CLOSE,13),1);
D1:=IF(CLOSE>1000,CROSS(VAR6,22),CROSS(VAR6,24));
STICKLINE(CMSD>65 AND C1,CMSD-88,0,3,1),COLORFF00FF;
机构打压建仓:CMSD>65 AND C1,COLORFF00FF;
ZC_1:=IF(LOW<DYNAINFO(7),0,IF(HIGH>DYNAINFO(7),DYNAINFO(7)-(DYNAINFO(7)-HIGH+0.02)/(HIGH-LOW+0.02),0));
ZC_2:=DMA(ZC_1,VOL/CAPITAL)*(100);
换手率:=VOL/FINANCE(7);00;
V1:=BARSCOUNT(CLOSE)*3.142/180;
PV:=(C*2+H+L)/4; 
SK:=EMA(PV,13) - EMA(PV,34); 
SD:=EMA(SK,9); 
多空平衡线:0,POINTDOT; 
空:(-2*(SK-SD))*61.8,  COLORCC3299 ; 
多:(2*(SK-SD))*61.8,COLORRED;
STICKLINE(多>REF(多,1),多,REF(多,1),2.6,0),COLOR000088;
STICKLINE(多>REF(多,1),多,REF(多,1),1.8,0),COLOR0000AA;
STICKLINE(多>REF(多,1),多,REF(多,1),1,0),COLOR0000CC;
STICKLINE(多>REF(多,1),多,REF(多,1),0.1,0),COLOR0000DD;
STICKLINE(空>REF(空,1),空,REF(空,1),2.6,0),COLOR008800;
STICKLINE(空>REF(空,1),空,REF(空,1),1.8,0),COLOR00AA00;
STICKLINE(空>REF(空,1),空,REF(空,1),1,0),COLOR00CC00;
STICKLINE(空>REF(空,1),空,REF(空,1),0.1,0),COLOR00DD00;
STICKLINE(REF(空,2)>REF(空,1) AND 空>REF(空,1) AND 空<=0,空,REF(空,1),2.6,0),COLOR888888;
STICKLINE(REF(空,2)>REF(空,1) AND 空>REF(空,1) AND 空<=0,空,REF(空,1),1.8,0),COLORAAAAAA;
STICKLINE(REF(空,2)>REF(空,1) AND 空>REF(空,1) AND 空<=0,空,REF(空,1),1,0),COLORCCCCCC;
STICKLINE(REF(空,2)>REF(空,1) AND 空>REF(空,1) AND 空<=0,空,REF(空,1),0.1,0),COLORDDDDDD;
STICKLINE(REF(多,2)>REF(多,1) AND 多>REF(多,1),多,REF(多,1),2.6,0),COLOR006666;
STICKLINE(REF(多,2)>REF(多,1) AND 多>REF(多,1),多,REF(多,1),1.8,0),COLOR008888;
STICKLINE(REF(多,2)>REF(多,1) AND 多>REF(多,1),多,REF(多,1),1,0),COLOR00AAAA;
STICKLINE(REF(多,2)>REF(多,1) AND 多>REF(多,1),多,REF(多,1),0.1,0),COLOR00CCCC;



2、各种撑压分析

{各种撑压分析}

N:=5;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);{高点}
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);{低点}
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2; E2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR BARSCOUNT(C)=1;
L1:=(D2 AND NOT(D1 AND E1<E2));  H2:=D1 AND NOT(D2 AND E1>=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS
(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR ISLASTBAR OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS
(IF(H2,H,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
R1:=BACKSET(ISLASTBAR,BARSLAST(HD)+1); S1:=R1>REF(R1,1); {前一高}
T1:=BACKSET(ISLASTBAR,BARSLAST(LD)+1); U1:=T1>REF(T1,1); {前一低}
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2); S2:=R2>REF(R2,1); {前二高}
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2); U2:=T2>REF(T2,1); {前二低}
T3:=BACKSET(U2,REF(BARSLAST(LD),1)+2); U3:=T3>REF(T3,1); {前三低}
T4:=BACKSET(U3,REF(BARSLAST(LD),1)+2); U4:=T4>REF(T4,1); {前四低}
R3:=BACKSET(S2,REF(BARSLAST(HD),1)+2); S3:=R3>REF(R3,1); {前三高}
R4:=BACKSET(S3,REF(BARSLAST(HD),1)+2); S4:=R4>REF(R4,1); {前四高}
短期压力:DRAWLINE(S2,H,S1,H,1),COLORRED,LINETHICK3;
短期支撑:DRAWLINE(U2,L,U1,L,1),COLORWHITE,LINETHICK3;
中期压力:DRAWLINE(S3,H,S2,H,1),COLORMAGENTA,LINETHICK3;
中期支撑:DRAWLINE(U3,L,U2,L,1),COLORYELLOW,LINETHICK3; 
长期压力:DRAWLINE(S4,H,S3,H,1),COLORBLUE,LINETHICK3;
长期支撑:DRAWLINE(U4,L,U3,L,1),COLORGREEN,LINETHICK3;
DRAWICON(S1,H*1.01,2);
DRAWICON(S2,H*1.01,2);
DRAWICON(S3,H*1.01,2);
DRAWICON(S4,H*1.01,2);
DRAWICON(U1,L*0.99,1);
DRAWICON(U2,L*0.99,1);
DRAWICON(U3,L*0.99,1);
DRAWICON(U4,L*0.99,1);
 
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);




3、KD罗威高低档,钝化信号

根据台湾高手罗威对KD公式的见解改编( 股民学院: http://www.58188.com )

{KD罗威高低档}

N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
{KD乘离:(SMA(RSV,M1,1)-SMA(SMA(RSV,M1,1),M2,1))*2,COLORSTICK;}
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:=3*K-2*D;
IF(K>REF(K,1),K,DRAWNULL),LINETHICK3,COLORRED;
IF(D>REF(D,1),D,DRAWNULL),LINETHICK2,COLORLIBLUE;
STICKLINE(1,20,20,100,0),COLORLIGRAY;
STICKLINE(1,50,50,100,0),COLORCYAN;
STICKLINE(1,80,80,100,0),COLORLIGRAY;
IF(COUNT(K>80,3)=3,90,DRAWNULL),POINTDOT,COLORBLUE,LINETHICK7;
IF(COUNT(K>80,1)=1,90,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK4;
IF(COUNT(K<20,3)=3,10,DRAWNULL),POINTDOT,COLORBLUE,LINETHICK8;
IF(COUNT(K<20,1)=1,10,DRAWNULL),POINTDOT,COLORLIMAGENTA,LINETHICK4;

上一篇:通达信源码精选:筹码压力拉升,相对空间位置,MACD面积

下一篇:通达信源码精选:K线直线排列,支撑压力画线,涨跌量能分析