通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信抓涨停选股指标公式
N:=2;M:=10;涨停次数:COUNT((CLOSE/REF(CLOSE,1)-1)*100>9.5,M)>N;
涨幅:=(H-REF(C,1))/(REF(C,1))*100;跌幅:=(-(REF(C,1)-L)/(REF(C,1)))*100;振幅:=涨幅+(-跌幅);真实振幅:=(REF(振幅,1))-(REF(振幅,2))+(REF(振幅,1));真实涨跌幅:=(ref(c,1)-c)/ref(c,1)*-100;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;明天可能涨停:if(ref(o>c,1){and跌幅>=-4.2andref(跌幅,1)<-3.5}and真实振幅>13and振幅>=5and振幅<ref(振幅,1)andj<20,5,0);
N:=10;量:=(CLOSE-LLV(LOW,32))/(HHV(HIGH,32)-LLV(LOW,32))*1.2*CLOSE;量1:=EMA(量,3);量2:=EMA(量,5);量3:=EMA(量,7);STICKLINE(量1>=量2,量3,量1,8,0),color0000AA;STICKLINE(量1>=量2,量3,量1,7,0),color0000BB;STICKLINE(量1>=量2,量3,量1,6,0),color0000CC;STICKLINE(量1>=量2,量3,量1,5,0),color0000DD;STICKLINE(量1>=量2,量3,量1,4,0),color0000EE;STICKLINE(量1>=量2,量3,量1,3,0),color0000FF;STICKLINE(量1<=量2,量3,量1,8,0),colorFF0000;STICKLINE(量1<=量2,量3,量1,7,0),colorFF3300;STICKLINE(量1<=量2,量3,量1,6,0),colorFF5500;STICKLINE(量1<=量2,量3,量1,5,0),colorFF7700;STICKLINE(量1<=量2,量3,量1,4,0),colorFF9900;STICKLINE(量1<=量2,量3,量1,3,0),colorFFBB00;STICKLINE(量1<=量2,量3,量1,2,0),colorFFDD00;STICKLINE(量1<=量2,量3,量1,1,0),colorFFFF00;T1:=量2>=量3AND量1<REF(量1,1);T2:=量2<量3AND量1>REF(量1,1);STICKLINE(T1,量1,量3,8,0),colorFFBB11;STICKLINE(T1,量1,量3,7,0),colorFFCC22;STICKLINE(T1,量1,量3,5,0),colorFFDD33;STICKLINE(T1,量1,量3,3,0),colorFFEE44;STICKLINE(T1,量1,量3,1,0),colorFFFF55;STICKLINE(T2,量1,量3,10,0),color338FDD;STICKLINE(T2,量1,量3,8,0),colorFF00FF;STICKLINE(T2,量1,量3,1,0),color00DDFF;STICKLINE(T2,量1,量3,8,0),color00AAFF;STICKLINE(T2,量1,量3,6.6,0),color00BBFF;STICKLINE(T2,量1,量3,4.4,0),color00CCFF;STICKLINE(T2,量1,量3,3.3,0),color00DDFF;STICKLINE(T2,量1,量3,2.2,0),color00EEFF;STICKLINE(T2,量1,量3,1,0),color00FFFF;大涨:CLOSE/REF(CLOSE,1)>=1.09OR((H-L)/REF(C,1)>0.1ANDC=H),LINETHICK0,color00ffFF;STICKLINE(大涨,量1,量3,8,0),color00ffFF;大跌:(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)<-0.098OR((H-L)/REF(C,1)>0.1ANDC=L),LINETHICK0,color00ff00;STICKLINE(大跌,量1,量3,8,0),color00ff00;HH:=HHV(量1,N);LL:=LLV(量1,N);y:ma(量1,6);y1:ma(y,2);y2:ma(y,4);y3:ma(y,6);
D:=EMA((C*2+H+L+O)/5,3);买卖:D;A线:HHV(D,21),COLORYELLOW;B线:LLV(D,21),COLOR9900FF;A:HHV(D,3);IF(D<A,A,DRAWNULL),COLOR00BB00;操盘线:IF(A=DANDA>=REF(A,1),A,DRAWNULL),COLOR9900FF,LINETHICK2;主升浪:IF(A线=A,A线,DRAWNULL),COLORRED,LINETHICK2;牛熊线:EMA((C*2+H+L+O)/5,29),COLORGRAY;
P1:=5;
P2:=4;
SSRCJL:=EMA(VOL,13);
SSRCJE:=EMA(AMOUNT,13);
SSRCBJX:=((SSRCJE/SSRCJL)/100);
SSRGL:=(((CLOSE-SSRCBJX)/SSRCBJX)*100);
绝对底:=SSRGL<(0-18);
大底:=SSRGL<(0-14);
中底:=SSRGL<(0-10);
短底:=SSRGL<(0-6);
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;取舍线:(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,LINETHICK1,COLORYELLOW;生命线:MA(取舍线,6),LINETHICK1,COLORRED;ZT:=C/REF(C,1)>1.098;BH:=BARSLAST(ZT);STICKLINE(ZT,REF(O,BH),REF(C,BH),2,0),COLORYELLOW;MMM:=REFDATE(HHV(H,120),DATE);NNN:=REFDATE(LLV(L,120),DATE);CR:(H+L+C)/3,NODRAW,COLORRED;AAA:=REFDATE(HHV(CR,45),DATE);BBB:=REFDATE(LLV(CR,45),DATE);CCC:=REFDATE(HHV(CR,15),DATE);DDD:=REFDATE(LLV(CR,233),DATE);STICKLINE(REF(AAA,1),AAA,AAA,5,0),COLOR773300;STICKLINE(REF(BBB,1),BBB,BBB,5,0),COLOR005599;STICKLINE(REF(CCC,1),CCC,CCC,5,0),COLOR117711;STICKLINE(REF(DDD,1),DDD,DDD,5,0),COLOR777777;
STICKLINE((SSRGL<(0-18)),60,80,1,0),COLORRED;
STICKLINE((SSRGL<(0-14)),40,60,1,0),COLORBLUE;
STICKLINE((SSRGL<(0-10)),20,40,1,0),COLORYELLOW;
STICKLINE((SSRGL<(0-6)),0,20,2,0),COLORWHITE;
高卖:80,POINTDOT,COLORRED;
低吸:20,POINTDOT,COLORGREEN;
VAR1:=LLV(LOW,P1);
VAR2:=HHV(HIGH,P1);
K:EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,P2),COLORRED,LINETHICK2;
D:EMA(0.667*REF(K,1)+0.333*K,2),COLORGREEN,LINETHICK2;
VAR1:=IF((CLOSE>OPEN),((CLOSE-OPEN)*VOL),IF((CLOSE<OPEN),((CLOSE-OPEN)*VOL),0));VAR2:=IF((CLOSE>REF(CLOSE,1)),((CLOSE-REF(CLOSE,1))*VOL),IF((CLOSE<REF(CLOSE,1)),((CLOSE-REF(CLOSE,1))*VOL),0));VAR3:=IF((OPEN>REF(CLOSE,1)),((OPEN-REF(CLOSE,1))*VOL),IF((OPEN<REF(CLOSE,1)),((OPEN-REF(CLOSE,1))*VOL),0));VAR4:=IF((CLOSE<OPEN),((OPEN-CLOSE)*VOL),IF((CLOSE>OPEN),((OPEN-CLOSE)*VOL),0));VAR5:=IF((CLOSE<REF(CLOSE,1)),((REF(CLOSE,1)-CLOSE)*VOL),IF((CLOSE>REF(CLOSE,1)),((REF(CLOSE,1)-CLOSE)*VOL),0));VAR6:=IF((OPEN<REF(CLOSE,1)),((REF(CLOSE,1)-OPEN)*VOL),IF((OPEN>REF(CLOSE,1)),((REF(CLOSE,1)-OPEN)*VOL),0));VAR7:=(CLOSE>OPEN);VAR8:=(CLOSE>REF(CLOSE,1));VAR9:=(OPEN>REF(CLOSE,1));VARA:=((VAR7ORVAR8)ORVAR9);主力:(SUM(((((VAR1+VAR2)+VAR3)/3)/CAPITAL),5)*1000),COLORRED;平衡:0,POINTDOT;VAR2L:=REF(LOW,1);VAR3L:=SMA(ABS(LOW-VAR2L),3,1)/SMA(MAX(LOW-VAR2L,0),3,1)*110;VAR4L:=EMA(IF(CLOSE*1.3,VAR3L*10,VAR3L/10),3);VAR5L:=LLV(LOW,13);VAR6L:=HHV(VAR4L,13);VAR7L:=IF(MA(CLOSE,34),1,0);VAR8L:=EMA(IF(LOW<=VAR5L,(VAR4L+VAR6L*2)/2,0),3)/618*VAR7L;VAR9LL:=IF(VAR8L>110,110,VAR8L);STICKLINE(VAR9LL<REF(VAR9LL,1),0,VAR9LL,2,0),COLORRED;
Y:=CLOSE/REF(CLOSE,1)>1.07;X:=VOL>MA(VOL,5);A1:=YANDX;攻击涨停:IF(A1,70,0);
[源码注释]通达信公式动态翻译结果
输出XG:成交量(手).MAVOL1[取周线数据]上穿成交量(手).MAVOL2[取周线数据]
每日通达信公式解答:
编写条件:
今日KDJ金叉涨幅大于上次KDJ金叉涨幅的选股公式。
编写方法:
AA:=CROSS(KD.K>KD.D,0.5);
XG:AAANDC/REF(C,1)>REF(C/REF(C,1),SUMBARS(AA,2)-1);
评论(0)