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

通达信源码精选:金山银都副图,天下无贼,强弱K线指标

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

1、金山银都副图

金山银都这个通达信公式,是进攻战法。

ZGD:=HHV(H,90)*0.99;
ZGD2:=CONST(ZGD);
ZDD:=LLV(L,90);
ZDD2:=CONST(ZDD);
{DRAWBAND(ZGD2,RGB(50,50,50),ZDD2,DRAWNULL);}
急速超跌:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VAR2:=(REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR3:=(REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR4:=(REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR5:=(REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR6:=(REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR7:=(REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR8:=(REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR9:=(REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARA:=(REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARD:=(CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2));
VARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
 
LJPK:=(C+H+O+L)/4;
MCC:=XMA(LJPK,20)*(1+620/1000);
MRR:=XMA(LJPK,32)*(1-350/1000);
ZXX:=(MCC+MRR)/2;
ZXA:=(MRR+ZXX)/2;
TJ2:=REF(L,1)<ZXA;
 
TJ3:=TJ2 AND COUNT(TJ2,6)>=6;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA17:=MA(C,17);
MA20:=MA(C,20);
MA24:=MA(C,24);
MA30:=MA(C,30);
MA43:=MA(C,43);
MA72:=MA(C,72);
MA200:=MA(C,200);
 
XA_2:=(2*CLOSE+HIGH+LOW)/4;
短底:=COST(5)*1;
中底:=EMA(XA_2,99)*0.91;
TJ4:=MA5>=MA24 AND MA24>=MA72 AND MA72>=MA200;
TJ5:=MA10>=MA30 AND MA20>=MA30;
TJ7:=TJ4 OR TJ5;
 
HDC:=20;
R1:=HHV(H,HDC);
R2:=LLV(L,HDC);
R3:=(R1-R2)/R2*100<21;
L1:=HHV(MA(C,20),HDC);
L2:=LLV(MA(C,20),HDC);
L3:=(L1-L2)/L2*100<5;
M1:=HHV(MA(C,60),HDC);
M2:=LLV(MA(C,60),HDC);
M3:=(M1-M2)/M2*100<5;
涨停:=REF(C,1)*1.07-C<0.01;
R4:=O < MIN(MA(C,5),MIN(MA(C,10),MA(C,20))) AND C>MAX(MA(C,5),MAX(MA(C,10),MA(C,20)));
A11:=C>REF(C,1) AND C>REF(C,3)  AND C>REF(C,6) AND C>REF(C,8) AND C>REF(C,10) AND H/C<=1.02;
A1:=MA(C,30);
A12:=REF(C,1)<REF(A1,1)*1.01 AND REF(C,3)<REF(A1,3)*1.01 AND REF(C,5)<REF(A1,5)*1.01 AND REF(C,7)<REF(A1,7)*1.01 AND
 REF(C,10)<REF(A1,10)*1.01 AND REF(C,13)<REF(A1,13)*1.01 AND REF(C,15)<REF(A1,15)*1.01;
 
A13:=C=HHV(C,23) AND (C>1.02*O OR H-C<C-O) AND C<LLV(C,90)*1.2 AND C>O;
ZZ:=A13 AND COUNT(A13,15)=1 AND COUNT(C/REF(C,1)>1.055,30) ;
A15:=CON2STR(FINANCE(40)/100000000,0)<1000;
银都股份:R3 AND 涨停 AND R4 AND L3 AND M3 AND (VAR19 OR REF(VAR19,1))
  AND (L<1.02*短底 OR L<1.02*短底) AND A11 AND A12 AND ZZ AND A15,COLORFFFF80; 



2、天下无贼

天:EMA(C,3),COLORYELLOW;
下:EMA(C,5),COLOR00FF00;
无:EMA(下,5),COLORWHITE,;
VARF1:=COUNT(CROSS(天,无),2)=1;
VARF2:=COUNT(CROSS(下,无),2)=1;
ZAI:=FILTER(VARF1 AND VARF2,2);
VV2:=REF(CLOSE,1);
VV3:=SMA((CLOSE-VV2),6,1)/SMA(ABS(CLOSE-VV2),6,1)*100;
DRAWICON(REF(VV3,1)>81 AND VV3<80,HIGH,2);
VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2;
DRAWTEXT(IF(CLOSE<VF1 AND VOL/240>MA(VOL,5)/240 AND CLOSE>=REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'★底☆'),COLORRED;
S:=MA(VOL,5)/MA(VOL,60),COLORRED,,LINETHICK2;
A:=MA(S,5),COLORGREEN,,LINETHICK2;
BIAS:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
F:=MA(S,121);
RSV:=(CLOSE-LLV(LOW,45))/(HHV(HIGH,45)-LLV(LOW,45))*100;
K:=SMA(RSV,15,1);
D:=SMA(K,15,1);
J:=3*K-2*D;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
DRAWTEXT(CROSS(84,RSI) , HIGH+0.25,'逃顶'),COLORYELLOW ;
贼:LLV(MA(H,9),1),COLORLIMAGENTA,LINETHICK3;
VAR2:=LLV(LOW,10);
VAR3:=HHV(HIGH,25);
动能趋势线:=100*EMA((CLOSE-VAR2)/(VAR3-VAR2),4);
DRAWTEXT(CROSS(动能趋势线,78),HIGH*1.02,'险'),COLORGREEN;
DRAWTEXT(CROSS(动能趋势线,86),HIGH*1.02,'减'),COLOR00FF00;
DRAWTEXT(CROSS(动能趋势线,89.5),HIGH*1.02,'出局'),COLORWHITE;
A1A:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1)-2*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*1,5,1);
A5A:=(HHV(H,60)-C)/(HHV(H,60)-LLV(L,60))*1;
DRAWTEXT(CROSS(A1A,EMA(A1A,5))AND EMA(A1A,5)<A5A,L*0.98,'黑马'),COLORYELLOW;
N2:=5;
A1:=REF(H,N2)=HHV(H,2*N2+1);
B1:=FILTER(A1,N2);
C1:=BACKSET(B1,N2+1);
HD:= FILTER(C1,N2);
RH:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);
SH:=RH>REF(RH,1);
H1:=REF(H ,BARSLAST(SH));
STICKLINE(H1,H1,H1,5,0),LINETHICK2,COLOR00FFFF;
DRAWTEXT(ISLASTBAR,H1*1.02,'近期高点'),COLORFFFF00;
TTP:=(CURRBARSCOUNT=5-4);
DRAWNUMBER(TTP AND H1,H1*0.98,H1),COLORFFFF00;
A2:=REF(L,N2)=LLV(L,2*N2+1);
B2:=FILTER(A2,N2);
C2:=BACKSET(B2,N2+1);
LD:=FILTER(C2,N2);
RL:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);
SL:=RL>REF(RL,1);
L1:=REF(L ,BARSLAST(SL));
STICKLINE(L1,L1,L1,5,0),COLORFFFF00,LINETHICK5;
DRAWTEXT(ISLASTBAR,L1*0.98,'近期低点'),COLORFFFF00;
DRAWNUMBER(TTP AND L1,L1*1.02,L1),COLOR00FFFF;
{股民学院 www.58188.com 整理}



3、强弱K线指标

 {强弱K线指标}

PV:=INDEXV;
 LB1:=V/REF(MA(V,5),1);LB2:=PV/REF(MA(PV,5),1);
 A1:=LB1>LB2;A2:=LB1<LB2;
 A3:=LB1>1.3*LB2 AND LB1<=2*LB2;A4:=LB1>2*LB2;
 A5:=LB2>1.3*LB1 AND LB2<=2*LB1;A6:=LB2>2*LB1;
 MA5:=EMA(C,5);
 MA13:=EMA(C,13);
 MA24:=EMA(C,24);
 MA72:=EMA(C,72);
 MA133:=EMA(C,133);
 MA200:=EMA(C,200);
 MA250:=EMA(C,250)COLORLIRED;
 MA360:=EMA(C,360)COLORLICYAN;
涨家数:INDEXADV,COLOR0066FF,NODRAW;
跌家数:INDEXDEC,COLOR99FF99,NODRAW;
EMA34:=EMA(C,34)LINETHICK2,COLOR0000FF;
EMA55:=EMA(C,55),COLOR0000CC;
买:=IF(EMA34>REF(EMA34,1),EMA34,DRAWNULL),COLOR0088FF,LINETHICK3;
卖:=IF(EMA34<REF(EMA34,1),EMA34,DRAWNULL),COLORFFA042,LINETHICK3;
低于大盘:STICKLINE(A2,H,L,0,0),COLORDDDD00;{青色}
STICKLINE(A2,O,C,3,0),COLOR888800;
 STICKLINE(A2,O,C,1.5,0),COLORAAAA00;
 STICKLINE(A2,O,C,1,0),COLORCCCC00;
弱于大盘:STICKLINE(A5,H,L,0,0),COLORGREEN;{绿色}
STICKLINE(A5,O,C,3,0),COLOR008800;
 STICKLINE(A5,O,C,1.5,0),COLOR00AA00;
 STICKLINE(A5,O,C,1,0),COLOR00CC00;
超弱大盘:STICKLINE(A6,H,L,0,0),COLORFF0000;{蓝色}
STICKLINE(A6,O,C,3,0),COLOR880000;
 STICKLINE(A6,O,C,1.5,0),COLORAA0000;
 STICKLINE(A6,O,C,1,0),COLORCC0000;
领先大盘:STICKLINE(A1,H,L,0,0),COLORFF00FF;{洋红}
STICKLINE(A1,O,C,3,0),COLOR880088;
 STICKLINE(A1,O,C,1.5,0),COLORAA00AA;
 STICKLINE(A1,O,C,1,0),COLORCC00CC;
强于大盘:STICKLINE(A3,H,L,0,0),COLOR0000FF;{大红}
STICKLINE(A3,O,C,3,0),COLOR000088;
 STICKLINE(A3,O,C,1.5,0),COLOR0000AA;
 STICKLINE(A3,O,C,1,0),COLOR0000CC;
超强大盘:STICKLINE(A4,H,L,0,0),COLOR00FFFF;{金黄}
STICKLINE(A4,O,C,3,0),COLOR008888;
 STICKLINE(A4,O,C,1.5,0),COLOR00AAAA;
 STICKLINE(A4,O,C,1,0),COLOR00CCCC;
 {STICKLINE(CURRBARSCOUNT=55,MA72,36*0.24,23*3.14,0),COLOR555555;}
 DRAWTEXT(CURRBARSCOUNT=59,MA72+(MA72*0.14),'金黄色K:超强大盘'),COLOR33EEEE;
 DRAWTEXT(CURRBARSCOUNT=59,MA72+(MA72*0.09),'大红色K:强于大盘'),COLOR0000FF;
 DRAWTEXT(CURRBARSCOUNT=59,MA72+(MA72*0.04),'洋红色K:领先大盘'),COLOREE00EE;
 DRAWTEXT(CURRBARSCOUNT=59,MA72-(MA72*0.04),'青色K线:低于大盘'),COLORCCCC00;
 DRAWTEXT(CURRBARSCOUNT=59,MA72-(MA72*0.09),'绿色K线:弱于大盘'),COLOR00AA00;
 DRAWTEXT(CURRBARSCOUNT=59,MA72-(MA72*0.14),'蓝色K线:超弱大盘'),COLORBLUE;


上一篇:通达信源码精选:日周MACD,仓位比例提示,蜡烛图战法

下一篇:通达信源码精选:财务K线综合,两色K线主图,分型顶底主图