通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信预警抓涨停指标公式
ZT:=C/REF(C,1)>1.0975ANDC=H;ANDC/O>1.051;TS:=BARSLAST(ZT);AA:=REF((H+L)/2,TS);板底:=REF(OPEN+(C-O)*0.05,TS);均价线:=AMOUNT/V/100,COLORRED;均价A:=REF(均价线,TS),COLORRED;HH:=COUNT(ZT,10)>=1;回调均价:=C>均价A;ANDL<均价A;ANDREF(C,1)>均价A;ANDREF(C,2)>均价A;ANDHH;ANDTS<9;ANDTS>4;回敲板底:C>REF(OPEN,TS)ANDL<板底;ANDREF(C,1)>板底;ANDREF(C,2)>板底;ANDHHANDTS<15ANDTS>=2;
{分时横盘公式}tt:=BARSCOUNT(C);CC:=CLOSE;zz:=SUM(AMOUNT,tt)/SUM(vol*100,tt);zz1:=BETWEEN(C/zz,1.05,0.95);均线:IF(zz1=0,MA(C,TT),zz),COLOR00FFFF,LINETHICK0;上均:均线+AVEDEV(C,tt)*2,COLOR00FF00,LINETHICK0;下均:均线-AVEDEV(C,tt)*2,COLORFF6600,LINETHICK0;时长:=if(HOUR>=13ANDHOUR<15,1,0);涨幅:=(close/DYNAINFO(3))>=1.03;跌幅:=(close/DYNAINFO(3))<=0.97;涨跌幅:=涨幅OR跌幅;yy:=SMA(vol,30,1);放量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0;横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<=0.05;横涨:=涨跌幅=0and横盘and时长and放量andCROSS(CC,上均)andDYNAINFO(22)<DYNAINFO(23);横跌:=涨跌幅=0and横盘and时长and放量andCROSS(下均,CC);PP:FILTER(横涨,100);UU:FILTER(横跌,50);DRAWTEXT(PP,C,'▲上冲'),color00ffff,linethick4;DRAWTEXT(UU,C,'▼下破'),COLORgreen,linethick4;VERTLINE(PP,3),colorffffff;VERTLINE(UU,3),colorffffff;
VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VARA:=BARSCOUNT(CLOSE);VARB:=VAR8<20ANDVAR9<23ANDVARA>35;VARC:=VARBANDCOUNT(VARB,1)=1;VARD:=EMA(CLOSE,21)-EMA(CLOSE,8);VARE:=EMA(VARD,5);VARF:=TROUGHBARS(3,6,1)<4ANDCROSS(VARD,VARE);VAR10:=IF(TROUGHBARS(3,16,1)=0ANDHIGH>LOW+0.04,4,0);VAR11:=ZIG(3,6)>REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1)<=REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1)ANDREF(ZIG(3,6),1)>=REF(ZIG(3,6),2)ANDREF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1)<=REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2)<=REF(ZIG(3,22),3);VAR14:=ZIG(3,22)<REF(ZIG(3,22),1)ANDREF(ZIG(3,22),1)>=REF(ZIG(3,22),2)ANDREF(ZIG(3,22),2)>=REF(ZIG(3,22),3);VAR15:=ZIG(3,51)>REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1)<=REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2)<=REF(ZIG(3,51),3);VAR16:=ZIG(3,51)<REF(ZIG(3,51),1)ANDREF(ZIG(3,51),1)>=REF(ZIG(3,51),2)ANDREF(ZIG(3,51),2)>=REF(ZIG(3,51),3);VAR17:=ZIG(3,72)>REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1)<=REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2)<=REF(ZIG(3,72),3);VAR18:=ZIG(3,72)<REF(ZIG(3,72),1)ANDREF(ZIG(3,72),1)>=REF(ZIG(3,72),2)ANDREF(ZIG(3,72),2)>=REF(ZIG(3,72),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);VAR1A:=EMA(VAR19,100);VAR1B:=2*(VAR19-VAR1A);VAR1C:=POW(VAR1B,3)*0.1+POW(VAR1B,1);VAR1D:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));VAR1E:=EMA(VAR1D*0.97,3);VAR1F:=(HIGH+LOW+CLOSE)/3;VAR20:=(VAR1F-MA(VAR1F,14))/(0.015*AVEDEV(VAR1F,14));VAR21:=CROSS(VAR1E,LOW);选股买点:VAR10,,COLORYELLOW;组合买:(VAR11+VAR13+VAR15+VAR17),,COLORRED;组合卖:(VAR12+VAR14+VAR16+VAR18),,COLORGREEN;黑马线:IF(MONTH<2008ANDVAR1B>0.1,VAR1C,0)*1,,COLOR6699CC;黑马信号介入点:选股买点ANDVARFANDVARCANDVAR21ANDVAR4<0ANDVAR5<2ANDVAR6=0,,COLORFFFF99;DRAWTEXT(VAR13,0.6,'●'),,COLORRED;DRAWICON(组合买,组合买,1);DRAWICON(组合卖,组合卖,9);DRAWTEXT(黑马信号介入点>0,4.5,'●我的黑马介入点'),,COLORRED;DRAWICON(选股买点>0,4.2,1);DRAWTEXT(选股买点ANDVARFANDVARC,2.8,'30%下单莫错过!'),,COLORMAGENTA;DRAWTEXT(VAR18,3,'空仓'),,COLORGREEN;DRAWTEXT(VAR20<-110AND选股买点>0,2,'选股买点'),,COLORYELLOW;DRAWTEXT(VAR17,1.3,'发现黑马'),,COLORFF6600;DRAWTEXT(选股买点ANDVAR20<-100ANDVARFANDVARC>0,4.1,'★组合5分钟线选股思路获利5%以上'),,COLORRED;-10;出现选股买点或组合买点预警选股
MA5:MA(CLOSE,5),pointdot,color000000,linethick1;
MA21:=EMA(CLOSE,21);
MID:MA(CLOSE,21),color000000,linethick0;
风险线:MA(CLOSE,13),linethick3,COLORGREEN;
止损线:MA(CLOSE,27),linethick0,Coloree00ee;
UPPER:MID+2*STD(C,20),LINETHICK0,COLORFFFFFF;
LOWER:MID-2*STD(C,20),LINETHICK0,COLORFFFFFF;
H1:=EMA(SLOPE(CLOSE,34)*20+CLOSE,75);
H2:=EMA(CLOSE,8);
Var1d:=H2-H1;
a:=(3*c+l+o+h)/6;
b:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+14*ref(a,6)+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+ref(a,20))/210;
d:=ma(b,10);
STICKLINE((MA21>REF(MA21,1)),MA21,MA21,5,6),LINETHICK2,Color00FFFF;
STICKLINE(C>=MIDANDC>=O,C,O,5,0),COLORRED;
STICKLINE(C>=MIDANDC>=O,H,L,0,0),COLORRED;
STICKLINE(C>=MIDANDC<O,C,O,5,1),COLORRED;
STICKLINE(C>=MIDANDC<O,O,H,0,0),COLORRED;
STICKLINE(C>=MIDANDC<O,C,L,0,0),COLORRED;
STICKLINE(C<MIDANDC>O,C,O,5,1),COLORffff00;
STICKLINE(C<MIDANDC<=O,C,O,5,1),COLORffff00;
STICKLINE(C<MIDANDC<=O,H,L,0,1),COLORffff00;
STICKLINE(C<MIDANDC>O,C,H,0,1),COLORffff00;
STICKLINE(C<MIDANDC>O,O,L,0,1),COLORffff00;
牛熊线:EMA(C,250),CIRCLEDOT,color999999;
界:MA(CLOSE,21),pointdot,color000000,linethick0;
VAR1:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR2:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWICON(CROSS(VAR2,MA(VAR3,6)),(LOW*0.95),4),linethick3;
DRAWICON(CROSS(MA(VAR3,6),VAR1),(HIGH*1.05),5),linethick3;
DRAWTEXT(CROSS(VAR2,MA(VAR3,6)),(LOW*0.988),'B'),coloryellow,linethick3;
DRAWTEXT(CROSS(MA(VAR3,6),VAR1),(HIGH*1.02),'S'),Coloree00ee,linethick2;
STICKLINE(C>=界ANDC>=O,C,O,5,0),COLORRED;
STICKLINE(C>=界ANDC>=O,H,L,0,0),COLORRED;
STICKLINE(C>=界ANDC<O,C,O,5,1),COLORRED;
STICKLINE(C>=界ANDC<O,O,H,0,0),COLORRED;
STICKLINE(C>=界ANDC<O,C,L,0,0),COLORRED;
STICKLINE(C<界ANDC>O,C,O,5,1),COLORffff00;
STICKLINE(C<界ANDC<=O,C,O,5,1),COLORffff00;
STICKLINE(C<界ANDC<=O,H,L,0,1),COLORffff00;
STICKLINE(C<界ANDC>O,C,H,0,1),COLORffff00;
STICKLINE(C<界ANDC>O,O,L,0,1),COLORffff00;
DRAWTEXT(CROSS(MA5,界),(LOW*0.80),'◇底背离'),COLORWHITE;
DRAWTEXT(CROSS(c,止损线)and止损线>风险线,(LOW*0.96),'主升浪'),COLORRED,linethick3;
A1:=FILTER(C>REF(C,1)*1.098,9);A2:=BARSLAST(A1);A3:=COUNT(C>REF(C,1)*1.098,13)>=1;涨停:=IF(A2<11ANDA3,A2+1,0);找钱:涨停>=1ANDMA(C,5)>REF(H,A2);
[源码注释]通达信公式动态翻译结果
输出XG:(收盘价-1日前的收盘价)*100/1日前的收盘价>=(20-0.01*100/1日前的收盘价)
每日通达信公式解答:
编写要求:
个股今天之前30天内平均股价的公式。
解答:
REF(MA(C,30),1);
评论(0)