通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信自动抓涨停指标公式
短期底部:=LLV(OPEN,30);
AA10:=MA(CLOSE,10);
AA12:=MA(CLOSE,12);
BB10:=((ATAN((AA10-REF(AA10,1)))*3.1416)*10);
BB12:=((ATAN((AA12-REF(AA12,1)))*3.1416)*10);
MA13:=MA(CLOSE,13);
VAR2:=(((CLOSE-MA(CLOSE,6))/MA(CLOSE,6))*100);
VAR3:=(((CLOSE-MA(CLOSE,12))/MA(CLOSE,12))*100);
VAR4:=(((CLOSE-MA(CLOSE,24))/MA(CLOSE,24))*100);
VAR5:=(((VAR2+(2*VAR3))+(3*VAR4))/6);
VAR6:=MA(VAR5,3);
VAR7:=DMA(EMA(CLOSE,12),((SUM(VOL,5)/3)/CAPITAL));
VAR8:=(((CLOSE-VAR7)/VAR7)*100);
VAR9:=((((REF(VAR8,1)<(0-40))AND(VAR8>REF(VAR8,1)))AND(REF(VAR8,1)<REF(VAR8,2)))AND((VAR8-REF(VAR8,1))>
2.5));
VARA:=(((CLOSE-MA(CLOSE,6))/MA(CLOSE,6))*100);
VARB:=(((CLOSE-MA(CLOSE,12))/MA(CLOSE,12))*100);
VARC:=(((CLOSE-MA(CLOSE,24))/MA(CLOSE,24))*100);
VARD:=REF(CLOSE,1);
VARE:=((SMA(MAX((CLOSE-VARD),0),5,1)/SMA(ABS((CLOSE-VARD)),5,1))*100);
VARF:=(((HIGH+LOW)+CLOSE)/3);
VAR10:=((VARF-MA(VARF,14))/(0.015*AVEDEV(VARF,14)));
VAR11:=(((((MA(AMOUNT,5)/MA(VOL,5))/100)-((MA(AMOUNT,110)/MA(VOL,110))/100))/((MA(AMOUNT,5)/MA(VOL,5))/100))
<(0-0.273));
VAR12:=(((CLOSE-MA(CLOSE,30))/MA(CLOSE,30))<(0-0.125));
VAR13:=(VAR11ANDVAR12);
VAR14:=((((VARA>=(0-45))AND(VARA<=(0-10)))AND(VARB<=(0-15)))AND(VARC<=(0-20)));
VAR15:=(COUNT(VAR14,1)>=1);
VAR16:=(VAR13ANDVAR15);
VAR17:=1;
VAB0:=531;VAB1:=1510000;VAB2:=VAB0+VAB1;VAB3:=IF(DATE>VAB2,0,1);
VARA12:=SMA(H,10,9)*VAB3;VARA13:=SMA(L,10,9)*VAB3;VAR18:=(CLOSE*VOL);
VAR19:=EMA((((((MA(VAR18,4)/MA(VOL,4))+(MA(VAR18,6)/MA(VOL,6)))+(MA(VAR18,13)/MA(VOL,13)))+(MA(VAR18,24)/MA
(VOL,24)))/4),1);
VAR1A:=(1*VAR19);
VAR1B:=(VAR19*0.92);
VAR1C:=EMA(CLOSE,34);
VAR1D:=MA((VAR1C*1.12),5);
VAR1E:=MA((VAR1C*0.82),5);
VAR1F:=(CLOSE<VAR1E);
VAR20:=((((((MA(AMOUNT,5)*VAR17)/MA(VOL,5))/100)-((MA(AMOUNT,125)/MA(VOL,125))/100))/((MA(AMOUNT,5)/MA
(VOL,5))/100))<((0-0.4)*VAR17));
VAR21:=HHV(HIGH,500);
VAR22:=LLV(LOW,500);
VAR23:=HHV(HIGH,250);
VAR24:=LLV(LOW,250);
VAR25:=HHV(HIGH,125);
VAR26:=LLV(LOW,125);
VAR27:=MA(((((((VAR21*0.45)+(VAR23*0.5))+VAR22)+VAR24)+VAR26)/5),35);
VAR28:=MA((((VAR23*0.62)+VAR26)/2),35);
VAR29:=MA((((VAR23*0.75)+VAR26)/2),18);
VAR2A:=MA((((((VAR23*0.93)+(VAR27*2))+(VAR28*1.8))+(VAR29*1.5))/4),18);
VAR2B:=MA(((((VAR21*0.95)+(VAR27*3))+(VAR28*2))/3),35);
VAR2C:=VAR27;
VAR2D:=VAR28;
VAR2E:=VAR29;
VAR2F:=VAR2A;
VAR30:=VAR2B;
VAR31:=((CLOSE-REF(MA(CLOSE,20),11))<(0-2));
VAR32:=(INDEXA/100000000);
VAR33:=INDEXADV;
VAR34:=INDEXDEC;
VAR35:=((VAR18/(VAR18+VAR19))*VAR17);
VAR36:=((VAR19/(VAR18+VAR19))*VAR17);
VAR37:=EMA(VAR35,10);
VAR38:=EMA(VAR36,10);
VAR39:=EMA(VAR37,10);
VAR3A:=EMA(VAR38,20);
VAR3B:=EMA(VAR37,3);
VAR3C:=EMA(VAR39,6);
VAR3D:=EMA(VAR3A,2);
VAR3E:=(VAR3C-VAR3D);
VAR3F:=(((VAR3C-REF(VAR3C,1))>0)AND((REF(VAR3C,1)-REF(VAR3C,2))<0));
VAR40:=IF((CROSS(VAR3B,VAR3C)AND(VAR3C<=20)),30,0);
VAR41:=VAR40;
VAR42:=(SMA(((AMOUNT/VOL)/100),13,1)*1.15);
VAR43:=(SMA(((AMOUNT/VOL)/100),13,1)*0.85);
VAR44:=(CLOSE-REF(MA(CLOSE,20),11));
VAR45:=(((((((((((((CLOSE<VAR1E)ANDVAR20)AND(CLOSE<VAR43))OR(((CLOSE<VAR1E)ANDVAR31)ANDVAR20))OR((CLOSE<
VAR1E)AND(CLOSE<VAR43)))OR(((CLOSE<VAR1E)ANDVAR20)AND(CLOSE<VAR43)))OR(VAR20AND(CLOSE<VAR2C)))OR((VAR20
ANDVAR31)AND(VAR44<(0-1.5))))OR(VAR20AND(CLOSE<VAR1E)))OR(VAR20AND(VAR44<(0-1.5))))OR(VAR31AND(CLOSE
<VAR43)))OR((CLOSE<VAR2C)AND(VAR44<(0-1.5))))OR((CLOSE<VAR1E)ANDVAR31));
VAR46:=(((CLOSE-MA(CLOSE,6))/MA(CLOSE,6))*100);
VAR47:=(((CLOSE-MA(CLOSE,12))/MA(CLOSE,12))*100);
VAR48:=(((CLOSE-MA(CLOSE,24))/MA(CLOSE,24))*100);
VAR49:=REF(CLOSE,1);
VAR4A:=((SMA(MAX((CLOSE-VAR49),0),5,1)/SMA(ABS((CLOSE-VAR49)),5,1))*100);
VAR4B:=(((HIGH+LOW)+CLOSE)/3);
VAR4C:=((VAR4B-MA(VAR4B,14))/(0.015*AVEDEV(VAR4B,14)));
VAR4D:=(((((MA(AMOUNT,5)/MA(VOL,5))/100)-((MA(AMOUNT,110)/MA(VOL,110))/100))/((MA(AMOUNT,5)/MA(VOL,5))/100))
<(0-0.273));
VAR4E:=(((CLOSE-MA(CLOSE,30))/MA(CLOSE,30))<(0-0.125));
VAR4F:=(VAR11ANDVAR12);
VAR50:=((((VAR2>=(0-45))AND(VAR2<=(0-7)))AND(VAR3<=(0-11)))AND(VAR4<=(0-14)));
VAR51:=(COUNT(VAR50,1)>=1);
VAR52:=(VAR4FANDVAR51);
VAR53:=(((((VAR20AND(CLOSE<VAR1E))ANDVAR31)AND(CLOSE<VAR2C))ANDVAR45)ANDVAR52);
VAR54:=(((CLOSE-MA(CLOSE,6))/MA(CLOSE,6))*100);
VAR55:=(((CLOSE-MA(CLOSE,12))/MA(CLOSE,12))*100);
VAR56:=(((CLOSE-MA(CLOSE,24))/MA(CLOSE,24))*100);
VAR57:=REF(CLOSE,1);
VAR58:=((SMA(MAX((CLOSE-VAR57),0),5,1)/SMA(ABS((CLOSE-VAR57)),5,1))*100);
VAR59:=(((HIGH+LOW)+CLOSE)/3);
VAR5A:=((VAR59-MA(VAR59,14))/(0.015*AVEDEV(VAR59,14)));
VAR5B:=((((((VAR54>=(0-15.8))AND(VAR54<=(0-12.2)))AND(VAR55<=(0-20.8)))AND(VAR56<=(0-27.5)))AND(VAR58
<=11.7))AND(VAR5A<=(0-145)));
VAR5C:=9.999999884842+026;
VAR5D:=(COST(10)*0)*VAB3;
VAR5E:=((((MA(AMOUNT,5)/MA(VOL,5))/100)-((MA(AMOUNT,125)/MA(VOL,125))/100))/((MA(AMOUNT,5)/MA(VOL,5))/100));
VAR5F:=MA((((LLV(LOW,45)-CLOSE)/(HHV(HIGH,45)-LLV(LOW,45)))*100),5);
VAR60:=((CROSS((0-5),VAR5F)AND(VAR5E<(0-0.4)))AND(((CLOSE-MA(CLOSE,30))/MA(CLOSE,30))<(0-0.19)));
VAR61:=MA(CLOSE,3);
VAR62:=(REF(CLOSE,2)*0.865);
VAR63:=(REF(CLOSE,13)*0.772);
VAR64:=MIN(VAR62,VAR63);
VAR65:=((100*VOL)/CAPITAL);
VAR66:=MA(CLOSE,13);
VAR67:=IF(((((CLOSE-VAR64)/CLOSE)<0.03)AND((SUM(VAR65,5)/5)<1.8)),1,0);
开始控盘:=STICKLINE((VAR6<=(0-10)),0,(0-20),5,0)*VAB3,COLORBROWN;
出击:=IF(((((VAR9ORVAR16)ORVAR53)ORVAR5B)OR((((CLOSE-VAR64)/CLOSE)<0.03)AND((SUM(VAR65,5)/5)<
1.8))),120,0),LINETHICK2,COLOR0000FF;
VAR68:=0;
VARQ:=MA(CLOSE,152);
VARW:=MA(CLOSE,194.16);
VAREE:=(VARW+(2*STD(CLOSE,170)));
VARR:=(VARQ+(2*STD(CLOSE,170)));
VART:=IF((DATE>1080822),0,1);
VAR611:=EMA(HHV(HIGH,500),21);
VAR71:=EMA(HHV(HIGH,250),21);
VAR81:=EMA(HHV(HIGH,90),21);
VAR91:=EMA(LLV(LOW,500),21);
VARA1:=EMA(LLV(LOW,250),21);
VARB1:=EMA(LLV(LOW,90),21);
VARC1:=EMA((((((((VAR91*0.96)+(VARA1*0.96))+(VARB1*0.96))+(VAR611*0.558))+(VAR71*0.558))+(VAR81*0.558))
/6),21);
VARD1:=EMA((((((((VAR91*1.25)+(VARA1*1.23))+(VARB1*1.2))+(VAR611*0.55))+(VAR71*0.55))+(VAR81*0.65))/
6),21);
VARE1:=EMA((((((((VAR91*1.3)+(VARA1*1.3))+(VARB1*1.3))+(VAR611*0.68))+(VAR71*0.68))+(VAR81*0.68))/
6),21);
VARF1:=EMA((((((VARC1*3)+(VARD1*2))+VARE1)/6)*1.738),21)*VAB3;
VAR101:=REF(LOW,1);
VAR111:=((SMA(ABS((LOW-VAR101)),3,1)/SMA(MAX((LOW-VAR101),0),3,1))*100);
VAR121:=EMA(IF(((CLOSE*1.35)<=VARF1),(VAR111*10),(VAR111/10)),3)*VAB3;
VAR131:=LLV(LOW,30);
VAR141:=HHV(VAR121,30)*VAB3;
VAR151:=IF(MA(CLOSE,58),1,0);
VAR161:=((EMA(IF((LOW<=VAR131),((VAR121+(VAR141*2))/2),0),3)/618)*VAR151);
VAR171:=(((IF((VAR161>50),50,VAR161)/20)*15)*VART)*VAB3;
SG:=EMA(HHV(HIGH,1),8);
X1:=EMA(CLOSE,8);
X30:=((X1<REF(X1,1))AND(CLOSE<X1));
X31:=IF(((SG<REF(SG,1))ORX30),1,0);
LC:=REF(CLOSE,1);
操作线:=SMA(MAX(CLOSE-LC,0),2,1)/SMA(ABS(CLOSE-LC),2,1)*100,COLORRED,LINETHICK2;
趋势线:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100,COLORGRAY;
震仓线:=45,COLORMAGENTA;
震仓线2:=50,COLORGRAY;
逃命线:=80,COLORRED;
抄底线:=20,COLORGREEN;
绝底线:=5,COLORBLUE;
PP2:=操作线<震仓线2ANDREF(操作线,1)>震仓线2;
PP:=操作线<震仓线ANDREF(操作线,1)>震仓线;
PP3:=操作线<抄底线ANDREF(操作线,1)>抄底线*VAB3;
财主抓涨停:(((((COUNT((X31=1),4)=3)AND(X31=0))ANDO<CAND(((C-REF(C,1))/REF(C,1))>0.085))*89)>=89)OR((C-REF(C,1))/REF(C,1)>0.085AND(REF(PP3,1)ORREF(PP,1)))ANDVAB3=1;
{以下涨停黄柱,涨幅>5%橙柱、跌停绿柱}
N:=16;M:=2;ZTB:=(C-REF(C,1))/REF(C,1)*100>=9.8;{涨停板}ZTC:=COUNT(ZTB,N);{N天内涨停个数}ZTT:=BARSLAST(ZTB);{上一次涨停距今天数}XG:ZTC>=M;{涨停数大于M}{COUNT(C/REF(C,1)>1.096,N)>=M;};
C2:=REF(C,1);
非ST涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
涨停:=非ST涨停;
STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR00FFFF;
STICKLINE(涨停,H,L,0,0),COLOR00FFFF;
非ST跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
跌停:=非ST跌停;
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
半涨1:=IF((C-C2)*100/C2>=(5-0.01*100/C2),1,0);
半涨2:=IF((C-C2)*100/C2<(10-0.01*100/C2),1,0);
JRS:=半涨1AND半涨2ANDFINANCE(33)>0;
STICKLINE(JRS,OPEN,CLOSE,2,0),COLOR0066FF;
STICKLINE(JRS,H,L,0,0),COLOR0066FF;
NUMBER:=COUNT(非ST涨停,BARSSINCE(非ST涨停)+1);
DRAWNUMBER(非ST涨停,HIGH*1.04,NUMBER),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.56,0.02,0,NUMBER),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.45,0.02,0,'上市以来共涨停'),COLORYELLOW;
保护价:(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3,COLORYELLOW,LINETHICK0;
心理价:(CLOSE*14+OPEN*7+HIGH*2+LOW*2)/25,COLORRED,LINETHICK0;
TYP:=(OPEN+CLOSE*2+HIGH+LOW)/5;
突破:(TYP+HIGH-LOW),COLORYELLOW,LINETHICK0;
阻力:TYP*2-LOW,COLORRED,LINETHICK0;
支撑:TYP*2-HIGH,COLORCYAN,LINETHICK0;
下降:TYP-HIGH+LOW,COLORMAGENTA,LINETHICK0;
A:=(C*2+H+L)/4*10;A1:=EMA(A,13)-EMA(A,34);A2:=EMA(A1,5);A3:=2*(A1-A2)*5.5;A4:=IF(A3>=0,A3,0);A5:=A4>REF(A4,1)ANDREF(A3<0,1);A6:=REF(A4,1)<=REF(A4,2)ANDA4>REF(A4,1);A7:=C/REF(C,1)>1.07;A5ORA6ANDA7;
A001:=CLOSE-REF(CLOSE,6);
A002:=MA(A001,6);
A003:=((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100;
A004:=SMA(A003,3,1);
A005:=SMA(A004,3,1);
A006:=EMA((3*A004-2*A005),2);
A007:=(HIGH+LOW+CLOSE)/3;
A008:=((A007-MA(A007,14))/(0.015*AVEDEV(A007,14)))/2;
A009:=(A008+(EMA(((0-(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))))+100)/100,3)*200-100))/2;
A010:=A009-REF(A009,14);
A011:=A009-REF(A009,26);
A012:=(A009+A010+A011)/3;
KKM:=EMA(A012,4);
A013:=HHV(HIGH,34);
A014:=(2*CLOSE+HIGH+LOW)/4;
A015:=LLV(LOW,34);
A016:=EMA(((A014-A015)/(A013-A015))*100,13);
A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);
KKMD:=A016-A017>1ANDA016<30ANDA017<30;
KKML:=A016-A017<0ANDA016>80ANDA017>80ANDREF(A016-A017,1)>0;
KKMQ:=COUNT(A016-A017>0,2)=2;
KKAL:=(A016-A017)<0;
生命线:MA(CLOSE,20),COLOR0000FF;
取舍线:MA(CLOSE,10);
DRAWTEXT(FILTER(KKMD,30),L*1.05,'最佳买入时机'),COLOR00FFFF;
DRAWTEXT(FILTER(KKML,30),H*1.05,'最佳卖出时机'),COLORFFFF00;
DRAWTEXT(FILTER(KKMQ,30),C*1.05,'持仓区'),COLOR00FF00;
DRAWTEXT(FILTER(KKAL,30),H,'空仓区'),COLORFF8080;
DRAWTEXT(FILTER(CLOSE/REF(CLOSE,1)>INDEXC/REF(INDEXC,1),30),L*0.95,'该股强于大盘'),COLORFF00FF;
DRAWTEXT(CROSS(MA(CLOSE,5),MA(CLOSE,10)),L*0.92,'可出手'),COLORFF00FF;
DRAWTEXT(CROSS(MA(CLOSE,10),MA(CLOSE,5)),H*1.08,'收手了'),COLORFF0000;
DRAWTEXT(FILTER(KKM>EMA(KKM,4)ANDKKM>REF(KKM,1),30),L*0.98,'快速介入');
DRAWTEXT(FILTER(KKM<EMA(KKM,4)ANDKKM<REF(KKM,1),30),H*1.02,'风险较大');
DRAWTEXT(FILTER(KKM>EMA(KKM,4)ANDKKM<REF(KKM,1),30),H,'休息观望~'),COLORAA8800;
DRAWTEXT(FILTER(KKM<EMA(KKM,4)ANDKKM>REF(KKM,1),30),L,'有防御能力');
A:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);A1:=C>REF(C,3);A2:="KDJ.J"<20;A3:=A>=1;AA:=REF(C,1)<REF(O,1);AA1:=O>REF(C,1);AA2:=C>=REF(C,1)*1.08;AA3:=AAANDAA1ANDAA2;A1ANDA2ANDA3ORAA3>0,COLORYELLOW;
[源码注释]通达信公式动态翻译结果
输出TJ:5日前的成交量(手)的20日累和
每日通达信公式解答:
编写要求:
股价突破整数关口的选股公式。
解答:
XS:=FRACPART(C);
ZS:=IF(XS=0.00,1,DRAWNULL);
XG:C>REF(ZS,1)ORO>REF(ZS,1);
评论(0)