通达信公式源码概况:

指标类别:通达信公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信简凡的倍量柱选股指标公式

  

Vvol:=IF(CURRBARSCOUNT=1ANDPERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;  

STICKLINE(CURRBARSCOUNT=1ANDPERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;  

VOLUME:VOL,VOLSTICK;  

倍量:VOL>=REF(V,1)*1.90ANDC>REF(C,1),NODRAW,COLORYELLOW;  

低量:VOL<REF(LLV(VOL,13),1),NODRAW,COLORGREEN;  

地量:VOL<REF(LLV(VOL,100),1),NODRAW,COLORMAGENTA;  

平量:ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03ORABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,NODRAW,COLORWHITE;  

倍缩:VOL<=REF(V,1)*0.5,NODRAW,COLORRED;  

梯量:COUNT(V>REF(V,1),3)=3ANDCOUNT(C>O,3)=3,NODRAW,COLOR824173;  

缩量涨:COUNT(C>REF(C,1),2)=2ANDCOUNT(V<REF(V,1),2)=2,NODRAW,COLORBLUE;  

STICKLINE(倍量,0,V,1,0),COLORYELLOW;  

STICKLINE(低量,0,V,1,0),COLORGREEN;  

STICKLINE(地量,0,V,1,0),COLORMAGENTA;  

STICKLINE(平量,0,V,1,0),COLORWHITE;  

STICKLINE(倍缩,0,V,1,0),COLORRED;  

STICKLINE(梯量,0,V,1,0),COLOR824173;  

STICKLINE(缩量涨,0,V,1,0),COLORBLUE;  

黄金柱:DRAWICON(LLV(L,3)>REF(L,3)ANDHHV(V,3)<REF(V,3)AND  

REF(C,3)>REF(O,3)ANDREF(V,3)>2*REF(V,4),0,1);  

流通〖亿〗:CAPITAL/1000000,LINETHICK0;  

内外比:DYNAINFO(51),COLORYELLOW,NODRAW;  

单日量比:V/REF(V,1),COLORWHITE,NODRAW;  

五日量比:V/(REF(MA(V,5),1)/240*FROMOPEN),COLORYELLOW,NODRAW;  

换手:VOL*10000/FINANCE(7);  

十日换手:SUM(换手,10);  

二十日换手:SUM(换手,20);  

MB1:=EMA(WINNER(C)*100,5),COLORYELLOW;  

MB2:EMA(MB1,2),COLORBLUE;  

MB3:EMA(MB2,2),COLORBLUE;  

MB4:EMA(MB3,2),COLORBLUE;  

MB5:EMA(MB4,2),COLORBLUE;  

MB6:EMA(MB5,2),COLORBLUE;  

MB7:EMA(MB6,2),COLORBLUE;  

MB8:EMA(MB7,2),COLORBLUE;  

MB9:EMA(MB8,2),COLORBLUE;  

MB10:EMA(MB9,2),COLORBLUE;  

MB11:EMA(MB10,2),COLORBLUE;  

MB12:EMA(MB11,2),COLORBLUE;  

MB13:EMA(MB12,2),COLORBLUE;  

MB14:EMA(MB13,2),COLORBLUE;  

N:=5;  

VAR2:MB1;  

VAR3:DRAWLINE(VAR2>=HHV(VAR2,N)=1,VAR2,VAR2<=LLV(VAR2,N)=1,VAR2,1);  

XG:=REF(VAR2,1)=REF(VAR3,1)ANDVAR2>REF(VAR2,1);  

STICKLINE(VAR2=VAR3ANDVAR2<MB4,VAR2,VAR2+10,1,0)COLORYELLOW;  

STICKLINE(XG,VAR2,VAR2+10,1,0),COLORRED;  

DRAWKLINE(H,O,L,C);  

黄金柱:=V/REF(V,1)>=1.9;  

K1:=SUMBARS(黄金柱,1);  

K2:=SUMBARS(黄金柱,2);  

K3:=SUMBARS(黄金柱,3);  

K4:=SUMBARS(黄金柱,4);  

K5:=SUMBARS(黄金柱,5);  

K6:=SUMBARS(黄金柱,6);  

K7:=SUMBARS(黄金柱,7);  

K8:=SUMBARS(黄金柱,8);  

K9:=SUMBARS(黄金柱,9);  

K10:=SUMBARS(黄金柱,10);  

AA:stICKLINE(K1,REF(L,K1-1)*1.002,REF(L,K1-1),5,0),COLORYELLOW;  

STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;  

A1:=REF(H,17)=HHV(H,2*17+1);B1:=FILTER(A1,17);  

C1:=BacKSET(B1,17+1);HD:=FILTER(C1,17);  

波峰:REF(H,BArslAST(HD)),POINTDOT,COLOR990099;  

{极点L}  

AL1:=REF(L,17)=LLV(L,2*17+1);BL1:=FILTER(AL1,17);  

CL1:=BACKSET(BL1,17+1);LD:=FILTER(CL1,17);  

波谷:REF(L,BARSLAST(LD)),POINTDOT,COLOR009900;  

T1:=BARSLAST(HD)<BARSLAST(LD)ANDNOT(HD);  

T2:=BARSLAST(HD)>BARSLAST(LD)ANDNOT(LD);  

STICKLINE(T1,波峰,波峰,5,0),COLOR990099;  

STICKLINE(T2,波谷,波谷,5,0),COLOR009900;  

V2V:=V/REF(V,1)>=1.9ANDC>REF(C,1);  

STICKLINE(V2V,O,C,-1,0),COLORYELLOW;  

高:=REF(HHV(H,80),3);  

低:=REF(LLV(L,80),3);  

H19:=高-(高-低);  

H38:=高-(高-低);  

H中:=高-(高-低);  

H61:=高-(高-低);  

H80:=高-(高-低);  

顶点:REFDATE(高,DATE),POINTDOT,LINETHICK2,COLORWHITE;  

低点:REFDATE(低,DATE),POINTDOT,LINETHICK2,COLORWHITE;  

BUY:=zig(3,10);  

SELL:=ma(BUY,2);  

DRAWICON(crOSS(BUY,SELL),L-0.1,7);  

DRAWICON(CROSS(SELL,BUY),H+0.1,8);  

DRAWKLINE(H,O,L,C);  

STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;  

立桩量:=vol=HHV(VOL,40)ANDVOL>1.9*REF(VOL,1);  

立桩量三日突破:=IF(BARSLAST(立桩量)=1ANDCLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3ANDCLOSE>REF(HIGH,3),1,0)));  

立桩量三日不破:=BARSLAST(立桩量)=3ANDREF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));  

BACKSET300:=BACKSET(立桩量三日不破,4);  

BACKSET301:=BACKSET(立桩量三日突破,4);  

立桩量成立:=FILTER(BACKSET300,3)ANDBACKSET301AND立桩量;  

DRAWTEXT(立桩量成立,HIGH,'立柱'),COLORGREEN;  

MA5:=MA(C,5);  

MA10:=MA(C,10);  

MA20:=MA(C,20);  

MA30:=MA(C,30);  

MA120:=SMA(C,120,1);  

ZH520:=ABS(MA5-MA20)/MA20*100&lt;=10;  

ZH530:=ABS(MA5-MA30)/MA30*100&lt;=10;  

QSXS1:=MA5&gt;REF(MA5,1);  

QSXS2:=MA20&gt;REF(MA20,1);  

QSXS3:=MA30&gt;REF(MA30,1);  

DTPL:=MA20&gt;MA30ANDMA30&gt;MA120;  

LYT:=DTPLANDQSXS2ANDQSXS3ANDCOUNT(QSXS1,4)&lt;=1;  

GJHS:=C&gt;MA5AND((QSXS1ANDNOT(REF(QSXS1,1)))ORC&gt;REF(C,3));  

LYKK:=GJHSAND(ZH520ORZH530)ANDLYT;  

买:=LYKKANDNOT(REF(LYKK,1));  

优选:买ANDCOUNT((MA10&gt;MA20),5)=5;

image.png

[源码注释]通达信公式动态翻译结果

AA赋值:如果模糊匹配品种名称ORNAMELIKE('*ST')ORNAMELIKE('SST')ANDNAMELIKE('S*ST')ORNAMELIKE('SST'),返回收盘价>=计算涨停价,否则返回如果(模糊匹配品种代码ORCODELIKE('300')),返回收盘价>=计算涨停价,否则返回收盘价>=计算涨停价

输出XG:统计30日中满足AA的天数>0

每日通达信公式解答:


  

编写条件:  

30日内出涨停次数大于等于1的选股公式。  

编写方法:  

AA:=IF(NAMELIKE('ST')ORNAMELIKE('*ST')ORNAMELIKE('SST')ANDNAMELIKE('S*ST')ORNAMELIKE('SST'),C>=ZTPRICE(REF(CLOSE,1),0.05),IF((CODELIKE('688')ORCODELIKE('300')),C>=ZTPRICE(REF(CLOSE,1),0.2),C>=ZTPRICE(REF(CLOSE,1),0.1)));  

XG:COUNT(AA,30)>0;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。