通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信10天内首次涨停选股指标公式
A1:=EXPMA(C,8)>EXPMA(C,30)ANDNDAY(EXPMA(C,8),REF(EXPMA(C,8),1),3)ANDNDAY(EXPMA(C,30),REF(EXPMA(C,30),1),3);A2:=C/REF(C,1)>=1.04;A3:=L<EXPMA(C,8)ANDC>EXPMA(C,8);A4:=L<EXPMA(C,8)ANDO>EXPMA(C,8);A5:=V/REF(V,1)*0.8;A6:=CCI.CCI>92;XG:A1ANDA2ANDA3ANDA5ANDA6ORA1ANDA2ANDA4ANDA5ANDA6;
ZF:=DYNAINFO(14)*100;{涨幅}LB:=DYNAINFO(17);{量比}{ZS:=DYNAINFO(24);}{涨速}HS:=DYNAINFO(37)*100;{换手}ZJ:=AMOUNT/10000;{资金}TM:=V-MA(V,10);{量填满}ZF>=2ANDZF<=5ANDLB>=2ANDZJ>=500ANDHS>1ANDTM>0;
快线:EMA(EMA(EMA(EMA(CLOSE,3),3),3),3),LINETHICK2,COLORRED;
慢线:EMA(REF(快线,1),3),LINETHICK2,COLOR00FFFF;
总趋势:EMA(EMA(EMA(EMA(EMA(CLOSE,65),3),3),3),3),LINETHICK2,COLORBLUE;
VAR84:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR85:=100-ABS(VAR84);
VAR86:=3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)-2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR87:=3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)-2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR88:=100-VAR87;
VAR89:=100-VAR86;
VAR92:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VAR93:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR94:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR95:=VAR93REF(VAR94,1)ANDVOLREF(VOL,1)ANDCLOSEREF(CLOSE,1);
VARA:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VARB:=SMA(VARA,3,1);
VARC:=SMA(VARB,3,1);
探索:=EMA(3*VARB-2*VARC,3);
主力:=(-1)*(EMA(VAR89,1)-50)+50;
Z1:=MA(主力,9);
VARD:=(-1)*(EMA(VAR89,1)-50)+50;
VARE:=(-1)*(EMA(VAR89,12)-50)+50;
LCC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LCC,0),6,1)/SMA(ABS(CLOSE-LCC),6,1)*100;
苦海:=EMA(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14)),6);
ZS:=MA(探索,3);
ZM:=MA(MA(探索,3),3);
A11:=3*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5,1)-2*SMA((CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100,5,1);
黑马线:=EMA(A11,5);
A12:=(黑马线-REF(黑马线,1))/REF(黑马线,1)*100;
A4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
趋势线3:=MA(3*SMA(A4,6,1)-2*SMA(SMA(A4,5,1),5,1),2);
A5:=(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))*100;
N:=3;
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW=VAR4,VAR3,0),5);
VAR6:=REF(CLOSE,1);
VAR7:=SMA(MAX(CLOSE-VAR6,0),6,1)/SMA(ABS(CLOSE-VAR6),6,1)*100;
VAR8:=LLV(LOW,5)=LLV(LOW,45)ANDCLOSE=OPEN*1.04;
VAR9:=CLOSE(REF(HIGH,1)+REF(LOW,1))/2;
VAR10:=VAR8ANDVAR9;
VAR11:=(2*CLOSE+HIGH+LOW)/4;
VAR12:=LLV(LOW,13);
VAR13:=HHV(HIGH,13);
VAR14:=LLV(LOW,1)=LLV(LOW,35)ANDCLOSE=OPEN*1.04;
VAR15:=CLOSE(REF(HIGH,1)+REF(LOW,1))/2;
VAR16:=EMA((VAR11-VAR12)/(VAR13-VAR12)*100,13);
VAR17:=(CLOSE-MA(CLOSE,6)/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3;
VAR19:=MA(CLOSE,13);
VAR20:=100-ABS((CLOSE-VAR19)/VAR19*100);
VAR21:=LLV(LOW,75);
VAR22:=HHV(HIGH,75);
VAR23:=(VAR22-VAR21)/100;
VAR24:=SMA((CLOSE-VAR21)/VAR23,20,1);
VAR25:=SMA((OPEN-VAR21)/VAR23,20,1);
VAR26:=3*VAR24-2*SMA(VAR24,15,1);
VAR27:=MA(HHV(HIGH,485),17);
VAR28:=MA(HHV(HIGH,222),17);
VAR29:=MA(HHV(HIGH,96),17);
VAR30:=MA(LLV(LOW,485),17);
VAR31:=MA(LLV(LOW,222),17);
VAR32:=MA(LLV(LOW,96),17);
VAR33:=MA((VAR30*0.96+VAR31*0.96+VAR32*0.96+VAR27*0.558+VAR28*0.558+VAR29*0.558)/6,17);
VAR34:=MA((VAR30*1.25+VAR31*1.23+VAR32*1.2+VAR27*0.55+VAR28*0.55+VAR29*0.65)/6,17);
VAR35:=MA((VAR30*1.3+VAR31*1.3+VAR32*1.3+VAR27*0.68+VAR28*0.68+VAR29*0.68)/6,17);
VAR36:=LLV(LOW,30);
VAR37:=MA((VAR33*3+VAR34*2+VAR35)/6*1.738,17);
VAR38:=VAR37;
VAR39:=LOW;
VAR40:=REF(LOW,1);
VAR41:=SMA(ABS(VAR39-VAR40),3,1)/SMA(MAX(VAR39-VAR40,0),N,1)*100;
VAR42:=MA(IF(CLOSE*1.35=VAR38,VAR41*10,VAR41/10),N);
VAR43:=HHV(VAR42,30);
VAR45:=3*VAR25-2*SMA(VAR25,15,1);
VAR46:=100-VAR45;
VAR49:=REF(LOW,1)*0.9;
VAR50:=LOW*0.9;
VAR53:=CLOSE-REF(CLOSE,1);
VAR54:=MAX(VAR53,0);
VAR55:=ABS(VAR53);
VAR56:=SMA(VAR54,7,1)/SMA(VAR55,7,1)*100;
VAR57:=SMA(VAR54,13,1)/SMA(VAR55,13,1)*100;
VAR58:=BARSCOUNT(CLOSE);
VAR59:=SMA(MAX(VAR53,0),6,1)/SMA(ABS(VAR53),6,1)*100;
VAR60:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
VAR61:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR62:=SMA((SMA(VAR61,4,1)-50)*2,3,1);
VAR63:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR64:=SMA(VAR63,4,1);
VAR65:=SMA(VAR64,3,1);
VAR66:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR68:=(HIGH+LOW+CLOSE)/3;
VAR69:=(VAR68-MA(VAR68,14))/(0.015*AVEDEV(VAR68,14));
VAR70:=(VAR68-MA(VAR68,70))/(0.015*AVEDEV(VAR68,70));
VAR71:=IF(VAR69=150ANDVAR69200ANDVAR70=150ANDVAR70200,10,0);
VAR72:=IF(VAR69=(-150)ANDVAR69(-200)ANDVAR70=(-150)ANDVAR70(-200),-10,VAR71);
VAR73:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VAR74:=REVERSE(VAR73);
VAR75:=SMA(VAR73,3,1);
绝佳买点:=MA(IF(LOW=VAR36,(VAR42+VAR43*2)/2,0),N);
跑:=FILTER(REF(黑马线,1)90ANDA120,7);
买线:=EMA(CLOSE,2);
卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);
指数位置:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
抄底:=CROSS(指数位置,10)ANDDATE=10280531;
A1:=VOL=HHV(VOL,120);
A2:=CLOSE/OPEN1.05;
TJ:=A1ANDA2;
龙:=VAR10;
买4:=VAR14;
AA1:=AMOUNT/VOL;
BB1:=LOWAA1*0.9;
CC1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*1001.2;
DD1:=LOWMA(CLOSE,5)*0.921;
EE1:=VOLMA(VOL,5)*1.5;
FF1:=BB1ANDCC1ANDDD1ANDEE1;
买3:=FILTER(FF1,3)ANDDATE=10280530;
二十天最低跌幅:=HHV(CLOSE,20)/LLV(CLOSE,20);
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;
X:=LLV(J,2)=LLV(J,8);
买1:=CROSS(J,REF(J+0.01,1))ANDXANDJ20AND二十天最低跌幅=1.3;
长期底部:=LLV(HIGH,30);
上:=SMA(LOW,5,2)*0.96;
短期底部:=LLV(HIGH,30)*0.93;
LC:=REF(CLOSE,1);
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
大顶:=VAR1720AND(VAR17REF(VAR17,1));
VAR76:=(OPEN+LOW+HIGH+CLOSE)/4;
MAN:=SMA(HIGH,21,2)*1.05;
短底2:=EMA(VAR76,5);
支撑:=HHV(短底2,60);
VAR77:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR78:=SMA(VAR77,5,1);
VAR79:=SMA(VAR78,8,1);
VAR80:=CROSS(VAR78,VAR79)ANDVAR795;
VAR81:=CLOSELLV(CLOSE,60)+0.3*LLV(CLOSE,60)ANDVAR80;
VAR82:=IF(CLOSE1000,VAR80,VAR81);
黑马起步:=VAR82;
逃:=FILTER(HIGH支撑ANDCLOSE支撑ANDCLOSE/OPEN0-1.06ANDCLOSEOPEN,5);
逃命:=黑马起步0;
选逃:=FILTER(逃命OR逃ORCROSS(84,RSI)OR大顶,3);
上线:=SMA(CLOSE,6.5,1);
下线:=SMA(CLOSE,13.5,1);
散户:=SMA(VAR75,3,1);
新庄:=SMA(散户,3,1);
高抛:=CROSS(新庄,散户)AND新庄75;
买:=CROSS(买线,卖线);
卖:=CROSS(卖线,买线);
大黑马:=CROSS(趋势线3,0)AND黑马线40;
大买:=FILTER(绝佳买点30000,5);
选底:=FILTER(LOW=上ANDHIGH=短期底部ANDCLOSE=长期底部ANDCLOSE/OPEN1.03,3);
稳赚10买:=FILTER(买3OR选底,3)ANDCOUNT(买1+买4+龙,3)0;
大资金进场:=VAR95ANDCOUNT(VAR95,30)=1;
{彩色K线}
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,3,0),COLOR000096;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,2.7,0),COLOR0000AA;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,2.4,0),COLOR0000C8;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,2.1,0),COLOR0000D2;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,1.8,0),COLOR0000E6;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,1.5,0),COLOR0000FA;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,1.2,0),COLOR1414FF;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,0.8,0),COLOR3737FF;
STICKLINE(CLOSE=OPEN,CLOSE,OPEN,0.4,0),COLOR4141FF;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,3,0),COLOR787800;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,2.7,0),COLORA0A000;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,2.4,0),COLORB4B400;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,2.1,0),COLORC8C000;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,1.8,0),COLORD2D200;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,1.5,0),COLORDCDC00;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,1.2,0),COLORE6E600;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,0.8,0),COLORF0F000;
STICKLINE(CLOSEOPEN,CLOSE,OPEN,0.4,0),COLORFFFF00;
选买:=FILTER(买3OR选底,3)ANDCOUNT(买1+买4+龙,3)0;
STICKLINE(选买,CLOSE,HHV(HIGH,90)*0.94,0.3,0),COLORFF0000;
DRAWTEXT(选买,HHV(HIGH,90)*1,'稳赚'),COLORFF0000;
DRAWTEXT(选买,HHV(HIGH,90)*0.97,'10%买'),COLORFF0000;
DRAWTEXT(选逃,HIGH*1.04,'逃'),COLOR00FFFF;
DRAWTEXT(买,LOW*0.996,'买'),COLOR0000FF;
DRAWTEXT(卖,HIGH*1,'卖'),COLOR00FFFF;
DRAWTEXT(VAR95ANDCOUNT(VAR95,30)=1,HIGH*1.095,'大资金'),COLOR008000;
DRAWTEXT(VAR95ANDCOUNT(VAR95,30)=1,HIGH*1.06,'进场'),COLOR008000;
DRAWTEXT(跑,HIGH*1.02,'跑'),COLOR00FFFF;
DRAWTEXT(大黑马,LOW*0.98,'大黑马'),COLORFFFFFF;
DRAWTEXT(CROSS(新庄,散户)AND新庄75,HIGH*1.04,'抛'),COLOR00FFFF;
DRAWTEXT(大买,LOW*0.96,'大买'),COLOR0000FF;
DRAWTEXT(IF(选底,100,0),LOW*0.995,'底'),COLOR399C71;
A3:=REF(C,2)/REF(C,3)>1.095;B3:=REF(V,1)/REF(V,2)<1.5ANDREF(C,1)<REF(C,2)ANDREF(C,1)<REF(O,1);D3:=C>REF(O,1);E3:=(C-LLV(C,100))/LLV(C,100)*100;叠加涨停:IF(A3ANDB3ANDD3ANDE3<50,100,0);
A:=MACD.DIF;
A1:=MACD.DEA;
A2:=MACD.MACD;
T:=BARSLAST(A<0ANDA1<0ANDCROSS(A,A1));
TJ:=EVERY(A2>0,3)ANDA2>REF(A2,1)ANDREF(A2,1)<REF(A2,2)ANDA>0ANDA1>0anda2>0;
XG:=COUNT(TJ,T)=1ANDTJ;
DRAWICON(XG,L*0.95,1);
STICKLINE(XG,C,O,2,0),COLORYELLOW;
STICKLINE(XG,H,L,0,0),COLORYELLOW;
[源码注释]通达信公式动态翻译结果
输出XG:1日前的收阴线 AND 收阳线AND 收盘价>1日前的开盘价 AND 开盘价<1日前的收盘价
每日通达信公式解答:
编写要求:
一阳穿五线同时MACD在0周上金叉,MACD值在正负0.1以内的金叉有效的选股公式
解答:
O<MIN(MIN(MIN(MIN(MA(C,5),MA(C,10)),MA(C,20)),MA(C,30)),MA(C,60))&&
C>MAX(MAX(MAX(MAX(MA(C,5),MA(C,10)),MA(C,20)),MA(C,30)),MA(C,60))&&
CROSS(MACD.DIF,MACD.DEA)&&BETWEEN(MACD.DIF,0,0.1);
评论(0)