相关简介:通达信强势k线底分型选股公式源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:主图
这是个非常简单但非常有效的副图指标,对于股价波段的运行有很好的描绘。当股价从相对底部整理完成时,青色的K线会开始钝化,买入点最好是在红色K线开始出现的时候,而不是青色线钝化的时候。主图可以设一个趋势指标结合
通达信指标公式源码:
MA3:=MA(C,3);
YTSL:=(3*C+L+O+H)/6;
辰星线:=(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLORFFFF00;
等待:=MA3<=辰星线;
VAR1:=(C>REF(C,1)ANDC>REF(C,2));
VAR2:=(REF(VAR1,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR3:=(REF(VAR2,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR4:=(REF(VAR3,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR5:=(REF(VAR4,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR6:=(REF(VAR5,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR7:=(REF(VAR6,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR8:=(REF(VAR7,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR9:=(REF(VAR8,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VARA:=(REF(VAR9,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VARB:=(REF(VARA,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VARC:=(REF(VARB,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VARD:=(C<REF(C,1)ANDC<REF(C,2));
VARE:=(REF(VARD,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VARF:=(REF(VARE,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR10:=(REF(VARF,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR11:=(REF(VAR10,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR12:=(REF(VAR11,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR13:=(REF(VAR12,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR14:=(REF(VAR13,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR15:=(REF(VAR14,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR16:=(REF(VAR15,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
VAR17:=(REF(VAR16,1)ANDC<=REF(C,1)ANDC>=REF(C,2));
VAR18:=(REF(VAR17,1)ANDC>=REF(C,1)ANDC<=REF(C,2));
DUANMAI:=((REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1))ANDVAR1);
XG:=BARSLAST(DUANMAI)<BARSLASTCOUNT(等待)AND等待ANDCOUNT(DUANMAI,BARSLASTCOUNT(等待))=1ANDDUANMAI;
RSV:=(CLOSE-LLV(LOW,12))/(HHV(HIGH,12)-LLV(LOW,12))*100;
K:=SMA(RSV,4,1);
D:=SMA(K,5,1);
J:=3*K-2*D;
XG2:=CROSS(J,D)ANDXG;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
AA:XG2ANDCCI>-50;
ST:=(C/O-1)*100;
SYX:=(O-C)/ABS(C-O)*(H-MAX(C,O))/O*30;
XYX:=(C-O)/ABS(C-O)*(MIN(C,O)-L)/O*30;
CJL:=(C-O)/ABS(C-O)*VOL/MA(VOL,200);
KXPF:=ST+SYX+XYX;
{K线评分总和:=SUM(KXPF,0),NODRAW;
}
L1:=SMA(KXPF,9,1);
K:=SMA(L1,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
C1:=CROSS(J,D)ANDREF(CROSS(D,J),1)ANDD>REF(D,1)ANDD>0ANDREF(D,2)>REF(D,3)
ANDC>MA(C,5)ANDO<MA(C,10);
主升:10*C1,COLORRED;
V00:=HIGH<REF(HIGH,1)ANDLOW<REF(LOW,1);{//高点低于昨日,低点低于昨日}
V01:=HIGH<REF(HIGH,1)ANDLOW>REF(LOW,1);{//包含于昨日}
V02:=HIGH>REF(HIGH,1)ANDLOW<REF(LOW,1);{包含昨日}
V03:=HIGH>REF(HIGH,1)ANDLOW>REF(LOW,1);{高高于昨日,低高于昨日}
V04:=REF(HIGH,2)<HIGHANDREF(LOW,2)<LOWANDREF(HIGH,2)>REF(HIGH,1)ANDREF(LOW,2)<REF(LOW,1);
V1:=COUNT(V00,6)>=3ANDCOUNT(V01ORV02,5)=0ANDLLVBARS(LOW,6)=1ANDHHVBARS(HIGH,6)>=5ANDV03;
V2:=COUNT(V00,7)>=3ANDCOUNT(V01ORV02,6)=1ANDLLVBARS(LOW,7)=2ANDHHVBARS(HIGH,7)>=6ANDV04;
V3:=COUNT(V00,7)>=3ANDCOUNT(V01ORV02,6)=1ANDLLVBARS(LOW,7)=1ANDHHVBARS(HIGH,7)>=6ANDV03;
V4:=COUNT(V00,8)>=3ANDCOUNT(V01ORV02,7)<=2ANDLLVBARS(LOW,8)=2ANDHHVBARS(HIGH,8)>=7ANDV04;
V5:=COUNT(V00,8)>=3ANDCOUNT(V01ORV02,7)<=2ANDLLVBARS(LOW,8)=1ANDHHVBARS(HIGH,8)>=7ANDV03;
V6:=COUNT(V00,9)>=3ANDCOUNT(V01ORV02,8)<=3ANDLLVBARS(LOW,9)=2ANDHHVBARS(HIGH,9)>=8ANDV04;
V7:=COUNT(V00,9)>=3ANDCOUNT(V01ORV02,8)<=3ANDLLVBARS(LOW,9)=1ANDHHVBARS(HIGH,9)>=8ANDV03;
V8:=COUNT(V00,10)>=3ANDCOUNT(V01ORV02,9)<=4ANDLLVBARS(LOW,10)=2ANDHHVBARS(HIGH,10)>=9ANDV04;
V9:=COUNT(V00,10)>=3ANDCOUNT(V01ORV02,9)<=4ANDLLVBARS(LOW,10)=1ANDHHVBARS(HIGH,10)>=9ANDV03;
V10:=COUNT(V00,11)>=3ANDCOUNT(V01ORV02,10)<=5ANDLLVBARS(LOW,11)=2ANDHHVBARS(HIGH,11)>=10ANDV04;
XG:=V1ORV2ORV3ORV4ORV5ORV6ORV7ORV8ORV9ORV10;
AA0:=HHV(ABS(C-O),5)/2;
DRAWTEXT(FILTER(XG=1,5),L,’底分型’),COLORYELLOW;
DRAWICON(FILTER(XG=1,5),L,1);
HV00:=HIGH>REF(HIGH,1)ANDLOW>REF(LOW,1);
HV01:=HIGH<REF(HIGH,1)ANDLOW>REF(LOW,1);
HV02:=HIGH>REF(HIGH,1)ANDLOW<REF(LOW,1);
HV03:=HIGH<REF(HIGH,1)ANDLOW<REF(LOW,1);
HV04:=REF(HIGH,2)>HIGHANDREF(LOW,2)>LOWANDREF(HIGH,2)>REF(HIGH,1)ANDREF(LOW,2)<REF(LOW,1);
HV1:=COUNT(HV00,6)>=3ANDCOUNT(HV01ORHV02,5)=0ANDHHVBARS(HIGH,6)=1ANDLLVBARS(LOW,6)>=5ANDHV03;
HV2:=COUNT(HV00,7)>=3ANDCOUNT(HV01ORHV02,6)=1ANDHHVBARS(HIGH,7)=2ANDLLVBARS(LOW,7)>=6ANDHV04;
HV3:=COUNT(HV00,7)>=3ANDCOUNT(HV01ORHV02,6)=1ANDHHVBARS(HIGH,7)=1ANDLLVBARS(LOW,7)>=6ANDHV03;
HV4:=COUNT(HV00,8)>=3ANDCOUNT(HV01ORHV02,7)<=2ANDHHVBARS(HIGH,8)=2ANDLLVBARS(LOW,8)>=7ANDHV04;
HV5:=COUNT(HV00,8)>=3ANDCOUNT(HV01ORHV02,7)<=2ANDHHVBARS(HIGH,8)=1ANDLLVBARS(LOW,8)>=7ANDHV03;
HV6:=COUNT(HV00,9)>=3ANDCOUNT(HV01ORHV02,8)<=3ANDHHVBARS(HIGH,9)=2ANDLLVBARS(LOW,9)>=8ANDHV04;
HV7:=COUNT(HV00,9)>=3ANDCOUNT(HV01ORHV02,8)<=3ANDHHVBARS(HIGH,9)=1ANDLLVBARS(LOW,9)>=8ANDHV03;
HV8:=COUNT(HV00,10)>=3ANDCOUNT(HV01ORHV02,9)<=4ANDHHVBARS(HIGH,10)=2ANDLLVBARS(LOW,10)>=9ANDHV04;
HV9:=COUNT(HV00,10)>=3ANDCOUNT(HV01ORHV02,9)<=4ANDHHVBARS(HIGH,10)=1ANDLLVBARS(LOW,10)>=9ANDHV03;
HV10:=COUNT(HV00,11)>=3ANDCOUNT(HV01ORHV02,10)<=5ANDHHVBARS(HIGH,11)=2ANDLLVBARS(LOW,11)>=10ANDHV04;
HXG:=HV1ORHV2ORHV3ORHV4ORHV5ORHV6ORHV7ORHV8ORHV9ORHV10;
DRAWTEXT(FILTER(HXG=1,5),H,’顶分型’),COLORYELLOW;
DRAWICON(FILTER(HXG=1,5),H,2);
[源码注释]通达信公式动态翻译结果
如果沪深品种类型=3ORFINANCE(3)=4,返回最高价=计算涨停价,否则返回最高价=计算涨停价 并且 收盘价<最高价
评论(0)