通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
MA2:=EMA(C,2);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
MA34:=EMA(C,34);
MA55:=EMA(C,55);
MA120:=EMA(C,89);
YCXN:=MA5 =REF(MA5,1);
H1:=MAX(MAX(MA5,MA13),MA34);
L1:=MIN(MIN(MA5,MA13),MA34);
XG:HHV(HIGH,10)/LLV(LOW,10) 1.25
ANDREF(CLOSE,1) (LLV(LOW,15)+(HHV(HIGH,15)-LLV(LOW,15))*0.9)
ANDC OANDDYNAINFO(4) 0
ANDCLOSE =HHV(HIGH,10)
ANDH1 CANDREF(C,1) L1ANDYCXNANDMA2 REF(MA2,1),COLORMAGENTA;
STICKLINE(L REF(H,1),REF(H,1),L,1,-1),COLOR990099;
STICKLINE(H REF(L,1),REF(L,1),H,1,-1),COLOR999900;
DRAWKLINE(H,O,L,C);
{涨停统计}
涨停:=CLOSE/REF(CLOSE,1) =1.095;
ZTCS:=COUNT(涨停,BARSSINCE(涨停)+1);
DRAWNUMBER(涨停,HIGH*1.04,ZTCS),COLORYELLOW;
GZT1:=STRCAT( 共涨停: ,CON2STR(ZTCS,0));
GZT2:=STRCAT(GZT1, 次
SSTS1:=STRCAT( 上市: ,CON2STR(FINANCE(42),0));
SSTS2:=STRCAT(SSTS1, 天
NTZZT1:=STRCAT( 距今: ,CON2STR(CONST(BARSLAST(涨停)),0));
NTZZT2:=STRCAT(NTZZT1, 天有涨停
ZTTJ1:=STRCAT(SSTS2,GZT2);
ZTTJ2:=STRCAT(ZTTJ1,NTZZT2);
ZTTJ:=STRCAT( 涨停统计: ,ZTTJ2);
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,ZTTJ),COLORYELLOW;
{涨停分类}
个线:=EMA(EMA(CLOSE,30),9);
大线:=EMA(EMA(INDEXC,45),9);
个股1:=CLOSE/个线*100;
1:=INDEXC/大线*100;
GGQD:=(个股1-大盘1);
N1:=REF(BARSLAST((C-REF(C,1))/REF(C,1)*100 9.6ANDC=H),1)+1;
回光返照:=COUNT(CROSS(MA(C,15),MA(C,5)),N1)=0AND
HHV(GGQD,20) 23ANDMA(C,5) MA(C,30)ANDGGQD HHV(GGQD,30)AND
GGQD 5AND(C-REF(C,1))/REF(C,1)*100 9.6ANDC=H,;
ZT:=(C-REF(C,1))/REF(C,1)*100 8.5,COLORWHITE;
开盘:=IF(REF(ZT,1) 0,(O-REF(C,1))/REF(C,1)*100,0),NODRAW;
BIAS1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
BIA:=(BIAS1-BIAS2);
BIS:=LLV(BIAS1,3);
超跌涨停:=ZT 0ANDBIS 0ANDBIA 5ANDMA(C,5) MA(C,60);
DRAWTEXT(超跌涨停,L*0.98, 超跌涨停 ),COLORGREEN;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
MA60:=MA(C,34);
F1:=(MA5-MA10)/MA10*100;
F2:=(MA10-MA20)/MA10*100;
F3:=(MA20-MA60)/MA10*100;
拉升涨停:=F1 1ANDF2 3ANDF3 0ANDZT
A1:=REF(C,20)=HHV(C,2*20+1);B1:=FILTER(A1,20);C1:=BACKSET(B1,20+1
);HD:=FILTER(C1,20);
A:=REF(H,BARSLAST(HD));
RSI1:=SMA(MAX(CLOSE-REF(CLOSE,1),0),5,1)/SMA(ABS(CLOSE-REF(CLOSE,
1)),5,1)*100;
钝化涨停:=ZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1
钝化涨停1:=GGQD 15ANDZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1 80
ANDREF(GGQD 15ANDZT 0ANDRSI1=HHV(RSI1,5)ANDRSI1 80,1)=0;
新股首次:=COUNT(ZT 0,BARSCOUNT(C))=1ANDZT 0AND
FINANCE(42)
涨停:=CROSS(C,A)ANDZT
DRAWTEXT(回光返照,L*0.99, 回光返照 ),COLORBLUE;
DRAWTEXT(拉升涨停,L*0.98, 拉升涨停 ),COLORRED;
DRAWTEXT(突破涨停,L*0.97, 突破涨停 ),COLORYELLOW;
DRAWTEXT(新股首次,L*0.96, 新股首次 ),COLORMAGENTA;
DRAWTEXT(钝化涨停1,L*0.95, 钝化涨停1 ),COLORLIRED;
DRAWTEXT(钝化涨停,L*0.94, 钝化涨停 ),COLORLIBLUE;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(涨停)),REF(HIGH,BARSLAST(涨
停)),0.1,0),COLORDDDD00;
STICKLINE(CLOSE,REF(LOW,BARSLAST(涨停)),REF(LOW,BARSLAST(涨
停)),0.1,0),COLOR00DDDD;
DRAWTEXT_FIX(ISLASTBAR,0,0.999,0, 情绪冲动未设止赢止损短期暴张
有疑问的企业不要下单! ),COLOREEEEEE;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA30:=MA(C,30);
MA60:=MA(C,60);
A:=(MA60-REF(MA60,5))*100 {MA60上拐幅度大于1%}
B:=REF(C,1) MA60ANDC MA60ANDC/REF(C,1) 0.99;
{昨天在MA60下,今天在MA60上,且涨停}
D:=MA5 MA10ANDMA10 MA30ANDMA30 MA60;
{MA5、MA10、MA30、MA60多头排列}
穿季线涨停:AANDB,DRAWTEXT_FIX(ISLASTBAR,0,0,0,GNBLOCK);
多头季涨停:BANDD,DRAWTEXT_FIX(ISLASTBAR,0,0,0,GNBLOCK);
季上涨停:AANDBANDD,DRAWTEXT_FIX(ISLASTBAR,0,0,0,GNBLOCK);
涨幅:=(H-REF(C,1))/(REF(C,1))*100;
跌幅:=(-(REF(C,1)-L)/(REF(C,1)))*100,LINETHICK0;
振幅:=涨幅+(-跌幅);
真实振幅:=(REF(振幅,1))-(REF(振幅,2))+(REF(振幅,1)),COLORRED;
真实涨跌幅:(ref(c,1)-c)/ref(c,1)*-100,LINETHICK0;
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,LINETHICK0;
明天可能涨停:if(ref(o c,1){and跌幅 =-4.2andref(跌幅,1) -3.5}and真实振幅 13
and振幅 =5and振幅 ref(振幅,1)andj 20,5,0)COLORMAGENTA;
LS:=C/REF(C,1) 1.048ANDC=HANDBETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));
拉升:FILTER(LS,28)*100,COLORYELLOW;
A4:=MA(CLOSE,20);
A5:=(CLOSE MA(CLOSE,5));
A6:=(MA(CLOSE,5) MA(CLOSE,10));
A7:=(CLOSE MA(CLOSE,10));
A8:=(MA(CLOSE,5) MA(CLOSE,20));
A9:=(CLOSE MA(CLOSE,20));
A10:=REF(A4,1);
A11:=(A4 A10);
AVX:(((((IF(A5,10,(0-10))+IF(A6,10,(0-10)))+IF(A7,10,(0-10)))+IF(A8,10,(0-10)))+IF(A9,10,(0-10)))+IF(A11,10,(0-10))),COLOR0000FF;
AVX零轴:0,COLOR00FFFF;
量:VOL,VOLSTICK;
涨停:=C/REF(C,1) 1.09;
涨停距今:=BARSLAST(涨停);
A:=V REF(V,1)*1/3;
B:=V REF(V,1)*1/2;
D:=V REF(V,1)*0.34;
XG:=涨停距今 =10ANDA;
XG1:=涨停距今 =10ANDB;
XG2:=涨停距今 =10ANDD;
涨停:=(C-REF(C,1))/REF(C,1)*100 9.95ANDC=H;
T:=BARSLAST(涨停);
涨停不破低点:T 20ANDL =REF(L,T);
STICKLINE(XG,0,VOL,0.25,0),COLORGREEN;
STICKLINE(XG1,0,VOL,0.25,0),COLORBLUE;
STICKLINE(XG2,0,VOL,0.25,0),COLORBLACK;
STICKLINE(涨停,0,VOL,0.25,0),COLORMAGENTA;
低量柱:=IF(V=LLV(V,10),9,8);
XG低:=低量柱 8ANDC REF(C,1);
STICKLINE(XG低,0,VOL,0.5,0),COLORYELLOW;
停牌:=DYNAINFO(4) 0;
一字板:=C=LANDC/REF(C,1) 1.095;
梯量:=V REF(V,1)ANDREF(V,1) REF(V,2)ANDREF(V,2) REF(V,3)ANDC REF(C,1)ANDREF(C,1) REF(C,2)ANDREF(C,2) REF(C,3);
梯量涨停:C/REF(C,1) 1.095AND梯量AND停牌ANDNOT(一字板);
上市天数:BARSCOUNT(O)+1,NODRAW;
AA:=C/REF(C,1) 1.095ANDC=HANDH =LAND上市天数 13;
二连板:FILTER(EVERY(AA,2)=1,2),STICK,LINETHICK2,COLORRED;
三连板:FILTER(EVERY(AA,3)=1,2),STICK,LINETHICK2,COLORBLUE;
五连板:EVERY(AA,5)=1,STICK,LINETHICK2,COLORYELLOW;
涨停:=(C-REF(C,1))/REF(C,1)*100 9.95ANDC=H;
T:=BARSLAST(涨停);
涨停不破低点:T 20ANDL =REF(L,T);
LONG:=26;
SHORT:=12;
M:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,M),colorblue,LINETHICK3;
MACD:2*(DIF-DEA),COLORSTICK;
A4:=BARSLAST(REF(CROSS(dif,dea),1));
B1:=REF(C,A4+1) CANDREF(dif,A4+1)
DRAWTEXT(FILTER(B1 0,5),dif+0.2, #39; #39;),coloryellow;
VAR1C:=(HIGH-MIN(OPEN,CLOSE));
VAR2C:=(CLOSE-OPEN);
VAR3C:=(MIN(OPEN,CLOSE)-LOW);
VAR4C:=(HIGH-LOW);
VAR5C:=((VOL*VAR1C)/VAR4C);
VAR6C:=((VOL*VAR2C)/VAR4C);
VAR7C:=((VOL*VAR3C)/VAR4C);
VAR8C:=((VAR5C-VAR6C)-VAR7C);
VAR4:=MA(CLOSE,5);
VAR5:=MA(CLOSE,10);
VAR6:=MA(CLOSE,30);
VAR7:=MA(CLOSE,60);
VAR8:=EMA(COST(85),7);
VAR9:=EMA(COST(15),7);
VARA:=(SUM(((CLOSE*VOL)*10),4)/SUM((VOL*200),4));
VARB:=(INTPART((VARA*10))/10);
VARC:=(SUM(((CLOSE*VOL)*10),7)/SUM((VOL*200),7));
VARD:=(INTPART((VARC*10))/10);
VARE:=(SUM(((CLOSE*VOL)*10),28)/SUM((VOL*200),28));
VARF:=(INTPART((VARE*10))/10);
:(EMA(CLOSE,5)-EMA(CLOSE,10)),colormagenta,LINETHICK2;
趋势:EMA(短线趋势,9),colormagenta,LINETHICK3;
VAR10:=((0-((10*(HHV(CLOSE,5)-CLOSE))/(HHV(CLOSE,5)-LLV(LOW,5))))+10);
VAR11:=((0-((10*(HHV(CLOSE,10)-CLOSE))/(HHV(CLOSE,10)-LLV(LOW,10))))+10);
VAR12:=((0-((10*(HHV(CLOSE,20)-CLOSE))/(HHV(CLOSE,20)-LLV(LOW,20))))+10);
VAR13:=((0-((10*(HHV(CLOSE,30)-CLOSE))/(HHV(CLOSE,30)-LLV(LOW,30))))+10);
VAR14:=REF(中线趋势,1);
VAR15:=中线趋势;
VAR16:=(VAR15-VAR14);
VAR17:=REF(短线趋势,1);
VAR18:=短线趋势;
VAR19:=(VAR18-VAR17);
VAR1A:=OPEN;
VAR1B:=CLOSE;
短线指标:IF(((((CROSS(短线趋势,中线趋势)AND(短线趋势 0))AND(中线趋势 (0-0.2)))AND(VAR11 45))AND(VAR16 0)),0.3,0.1),COLOR66FF00;
公式解读:
公式编写要求:
5天内大于6%小于10%的公式。
公式编写方法:
EXIST(BETWEEN(HSL.HSL,6,10),5);