股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[指标编写] 通达信强势起点指标公式源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-9-6 09:13:25

M周期内:=10;
X108:=LOW>REF(HIGH,1);
零号:=COUNT(X108,M周期内);
等于或大于:=1;
N个基因:=10;
峰谷周期:=5;
峰谷虚实:=1;
高量周期:=10;
X3:=REF(CLOSE,1);
X4:=ISLASTBAR AND CLOSE<500;
X5:=vol;
X6:=MA(VOL,5);
X7:=X5<=LLV(X5,100)*1;
X8:=COUNT(X7,5)>=3 OR X6<=LLV(X6,100) AND X5>0 AND BARSCOUNT(X5)>=100;
X9:=FILTER(X8,5);
X10:=VOL>=REF(VOL,1)*1.9 AND CLOSE>X3;
X11:=HIGH<0.382*HHV(HIGH,240) OR LOW<1.382*LLV(LOW,240);
X12:=VOL<0.382*HHV(VOL,240) AND MA(VOL,5)<=MA(VOL,40);
X13:=X12 AND X11;
X14:=VOL/REF(VOL,1)>=1.1;
X15:=CLOSE>OPEN AND BETWEEN(VOL/REF(VOL,1),1.1,2.5);
X16:=CLOSE>REF(CLOSE,1) AND REFX(LLV(MIN(CLOSE,OPEN),3),3)>=LOW;
X17:=X14 AND X16;
X18:=X17 AND X13;
X19:=CLOSE>OPEN AND CLOSE<REFX(OPEN,1) AND REFX(X16,1);
X20:=LLV(MIN(OPEN,CLOSE),3);
X21:=0.97*MA(VOL,3)<=REF(VOL,3);
X22:=REF(CLOSE>X3 AND VOL>1.1*REF(VOL,1),3) AND CLOSE>=REF(CLOSE,3) AND REF(CLOSE>=OPEN,3) AND X20>=REF(OPEN,3) AND X21;
X23:=BARSLAST(X22);
X24:=REF(X20,X23);
X25:=REF(CLOSE,X23+3);
X26:=REF(OPEN,X23+3);
X27:=峰谷周期;
X28:=IF(峰谷虚实=0,HIGH,MAX(CLOSE,OPEN));
X29:=5;
X30:=X29*1;
X31:=BARSLAST(FILTER(BACKSET(FILTER(REF(X28,X30)=HHV(X28,2*X30+1),X30),X30+1),X30));
X32:=REF(X28,X31);
X33:=X29*2;
X34:=BARSLAST(FILTER(BACKSET(FILTER(REF(X28,X33)=HHV(X28,2*X33+1),X33),X33+1),X33));
X35:=REF(X28,X34);
X36:=X29*4;
X37:=BARSLAST(FILTER(BACKSET(FILTER(REF(X28,X36)=HHV(X28,2*X36+1),X36),X36+1),X36));
X38:=REF(X28,X37);
X39:=X29*8;
X40:=BARSLAST(FILTER(BACKSET(FILTER(REF(X28,X39)=HHV(X28,2*X39+1),X39),X39+1),X39));
X41:=REF(X28,X40);
X42:=1+0/100;
X43:=crOSS(CLOSE,X42*X32);
X44:=X43 AND REF(HHV(X28,X31),1)<=X32;
X45:=CROSS(CLOSE,X42*X35);
X46:=X45 AND REF(HHV(X28,X34),1)<=X35;
X47:=CROSS(CLOSE,X42*X38);
X48:=X47 AND REF(HHV(X28,X37),1)<=X38;
X49:=CROSS(CLOSE,X42*X41);
X50:=X49 AND REF(HHV(X28,X40),1)<=X41;
X51:=X44 OR X48 OR X48 OR X50;
过左:=COUNT(X51,M周期内);
N:=50;
轴线:=100;
趋势线:=IF((AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*100);
OL:=0;
DL:=(AMOUNT/CLOSE)/LLV((AMOUNT/CLOSE),N);
N9:=20;
轴线8:=100;
趋势线8:=IF((AMOUNT/C)/(HHV(AMOUNT,N9)/HHV(C,N9))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,N9)/HHV(C,N9))*100);
OL8:=0;
DL8:=(AMOUNT/CLOSE)/LLV((AMOUNT/CLOSE),N9);
STICKLINE(趋势线8=100,0,32,4,0),COLORBLUE;
STICKLINE(趋势线8=100,0,32,3.5,0),COLORFF3300;
STICKLINE(趋势线8=100,0,32,3,0),COLORFF5500;
STICKLINE(趋势线8=100,0,32,2.5,0),COLORFF7700;
STICKLINE(趋势线8=100,0,32,2,0),COLORFF9900;
STICKLINE(趋势线8=100,0,32,1.5,0),COLORFFBB00;
STICKLINE(趋势线=100,0,32,3.5,0),COLOR000066;
STICKLINE(趋势线=100,0,32,3.2,0),COLOR000077;
STICKLINE(趋势线=100,0,32,2.4,0),COLOR000099;
STICKLINE(趋势线=100,0,32,1.6,0),COLOR0000CC;
STICKLINE(趋势线=100,0,32,0.8,0),COLOR0000FF;
STICKLINE(趋势线=100,0,32,0,0),COLORFFFFFF;
STICKLINE(过左>0,33,65,4,0),COLOR0000FF;
STICKLINE(过左>0,33,65,3,0),COLOR0033FF;
STICKLINE(过左>0,33,65,1.5,0),COLOR0066FF;
STICKLINE(过左>0,33,65,0.9,0),COLOR3399CC;
STICKLINE(过左>0,33,65,0.5,0),COLOR00FFFF;
STICKLINE(过左>0,33,65,0,0),COLOR33FFFF;
STICKLINE(零号,66,99,4,0),COLORFF55FF;
STICKLINE(零号,66,99,3.5,0),COLOR880088;
STICKLINE(零号,66,99,2.9,0),COLORAA00AA;
STICKLINE(零号,66,99,2.6,0),COLORCC00CC;
STICKLINE(零号,66,99,1.5,0),COLOREE00EE;
STICKLINE(零号,66,99,0.3,0),COLORFF44FF;
主力:=VOL/CAPITAL;
三日主力:=(主力+REF(主力,2))/3;
主力换手:主力/三日主力,NODRAW;
DRAWNUMBER(主力换手>1.9,6,主力换手),COLORWHITE;
{DRAWTEXT((主力换手>1.9),5,' 换手'),COLORYELLOW;};
VAR1E:=SMA(AMOUNT,10,1)/10000;
VAR2E:=REF(VAR1E,1);
盘中过压:=DYNAINFO(7)>DYNAINFO(11) AND DYNAINFO(17)>1 AND CLOSE/REF(CLOSE,1)>1.02 AND CLOSE=C,COLORFF44FF;
N3:=BARSLAST(CROSS(C,MA(C,20)));
N4:=BARSLAST(CROSS(MA(C,20),C));
AA1:=IF(N3<N4,N3+1,0);
BB1:=(C-REF(C,AA1))/REF(C,AA1)*100;
竞价牛股:=CROSS(BB1,7) AND C/REF(C,1)>1.01 {AND 盘中过压};
竞价牛股1:=CROSS(BB1,2) AND C/REF(C,1)>1.01 AND 盘中过压;
DRAWTEXT((竞价牛股>0),28,'竞价牛股'),COLORYELLOW;
DRAWTEXT((竞价牛股1>0),18,'过压牛股'),COLORWHITE;
资金倍数:VAR1E/VAR2E,NODRAW;
DRAWNUMBER(资金倍数>2,25,资金倍数),COLORWHITE;
VAR0:=21;
VAR1:=IF((LOW = LLV(LOW,VAR0)),LOW,DRAWNULL);
VAR2:=CONST(BARSLAST((VAR1 != DRAWNULL)));
VAR8:=IF((CURRBARSCOUNT <= (VAR2 + 1)),IF((LOW = LLV(LOW,VAR0)),LOW,DRAWNULL),DRAWNULL);
DJ:=REF(LOW,BARSLAST((VAR8 = LOW)));
VAR90:=(DJ * (1 + ((1 * 3) / 100)));
VAR91:=(CLOSE > CONST(VAR90));
VAR92:=((REF(VAR91,1) = 0) OR (REF(DJ,1) = DRAWNULL));
买点:=(((VAR91 = 1) AND VAR92),(DJ * 1.03),(DJ * 1.03)),COLORRED;
DRAWTEXT_FIX(1,0.95,0.5,1,STRCAT(STRCAT('【极品买点】',CON2STR(买点,2)),'元')),COLORWHITE;
公积金:FINANCE(18),COLORRED,NODRAW;
N5:=2;
大阳:(C/REF(C,1)-1)*100>=N5 AND V>REF(V,1);
TAX:=HORCALC(HYBLOCK,105,1,DRAWNULL);
T1:=10;
T2:=20;
T3:=40;
M1:=(HHV(C,T1)-LLV(C,T1))/(HHV(C,T1)+LLV(C,T1))*200;
M2:=(HHV(C,T2)-LLV(C,T2))/(HHV(C,T2)+LLV(C,T2))*200;
M3:=(HHV(C,T3)-LLV(C,T3))/(HHV(C,T3)+LLV(C,T3))*200;
短期波动:=M1,COLORRED;
中期波动:=M2,COLORYELLOW;
长期波动:=M3,COLORMAGENTA;
竞价牛股2:长期波动>REF(长期波动,1) AND CROSS(BB1,7) AND C/REF(C,1)>1.01 AND 大阳 AND TAX>0.5 AND TAX<5 ;
牛股: CROSS(BB1,7) AND C/REF(C,1)>1.01 ;
五天线:L/MA(CLOSE,5);
wr1:=100*(HHV(HIGH,10)-CLOSE)/(HHV(HIGH,10)-LLV(LOW,10));
WR2:=100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6));
LH:=100-EMA((HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100,34);
J:=EMA(LH,21);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
obv:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
MAOBV:=MA(OBV,30);
DRAWTEXT(ISLASTBAR=1,120,' ' ),COLORYELLOW;
X1:=LH>J;
X2:=DIF>DEA;
X3K:=K>D;
X4K:=cci>100;
X5K:=C>SAR.sar;
X6K:=rsi.RSI1>50;
X7K:=OBV>MAOBV;
XJ:=X1 + X2 + X3K + X4K + X5K + X6K + X7K;
DRAWNUMBER(1,120,XJ),COLORLIGRAY;
DRAWNUMBER(XJ=7 OR XJ=6,120,XJ),COLORMAGENTA;
DRAWNUMBER(XJ=5,120,XJ),COLORGREEN;
MA5:=MA(C,5);
MA10:=MA(C,10);
V1:=MA(V,5);
V2:=MA(V,10);
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEAD:=EMA(DIFF,9);
RSVD:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
kd:=SMA(RSVD,3,1);
DDD:=SMA(KD,3,1);
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))*1000/(15*AVEDEV(TYP,14));
CCIMA:=MA(CCI,10);
V11:=SUM(IF(TYP>REF(TYP,1),TYP*VOL,0),14)/SUM(IF(TYP<REF(TYP,1),TYP*VOL,0),14);
MFI:=100-(100/(1+V11));
MAMFI:=MA(MFI,10);
DD:=((V1>V2)+(DIFF>DEAD)+(KD>DDD)+(MA5>MA10)+(CCI>CCIMA)+(MFI>MAMFI));
KK:=((V1<V2)+(DIFF<DEAD)+(KD<DDD)+(MA5<MA10)+(CCI<CCIMA)+(MFI<MAMFI));
DRAWNUMBER(1,140,DD),COLORYELLOW;
DRAWICON(CROSS(DD,2),DD,1);
{昨天情绪:开盘额/REF(AMOW,2)*100 ,NODRAW;
当天情绪:当天竞价金额/REF(AMOW,1)*100, NODRAW;
情绪符合:当天情绪>昨天情绪 AND 当天情绪>2, NODRAW;};
X_2:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;
X_3:=MAX(HIGH-LOW,MAX(HIGH-REF(CLOSE,1),REF(CLOSE,1)-LOW))/REF(CLOSE,1)*100;
X_4:=(HIGH-LOW)/REF(CLOSE,1)*100;
X_5:=VOL/REF(MA(VOL,5),1);
X_6:=VOL;
X_7:=(HIGH+LOW+CLOSE)/3;
X_8:=CLOSE>X_7;
X_9:=CLOSE<X_7;
X_10:=X_2*X_6;
X_11:=Abs(IF(X_9,X_10,0));
X_12:=IF(X_8,X_10,0);
超级买入:(SUM(IF(X_10>0,X_10,0),7))/10,COLORRED,NODRAW;
超级卖出:(ABS(SUM(IF(X_10<0,X_10,0),7)))/10,COLOR008000,NODRAW;
累计庄买:(超级买入-超级卖出),NODRAW;
累计金额:(AMO)/10000,NODRAW;
庄比例:累计庄买/累计金额*100,NODRAW;
O1:=MA(C,O), LINETHICK1;
N1:=MA(C,21), LINETHICK1;
TYPA:=(HIGH+LOW+CLOSE)/3;
CCIA:=(TYPA-MA(TYPA,13))/(0.015*AVEDEV(TYP,13));
DRAWTEXT(CROSS(CCIA,100) AND CCIA>REF(CCIA,1),75,'加多'),COLORYELLOW;
NC:=3;
ND:=12;
MID:=(3*C+L+H)/5;
本周期重心价:MID,NODRAW,COLORRED;
内重心价上涨1:COUNT(本周期重心价>REF(本周期重心价,1),NC)/NC*100,COLORYELLOW;
内重心价上涨5:COUNT(本周期重心价>REF(本周期重心价,1),ND)/ND*100,COLORMAGENTA;
DRAWICON(CROSS(DD,2),90,1);
PJJ:=DMA((H + L + C * 2) / 4,0.9);
JJ2:=REF(EMA(PJJ,3),1);
QJJ:=VOL / ((H - L) * 2 - ABS(C - O));
XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2)) + IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2));
ZLL:=VOL / CAPITAL;
HSL1:=IF(ZLL > 10,10,ZLL);
HSL:=XVL / 20 / 1.15;
攻击流量:=HSL * 0.55 + REF(HSL,1) * 0.33 + REF(HSL,2) * 0.22;
GJJ:=EMA(攻击流量,8);
LLJX:=EMA(攻击流量,3);
流量:=LLJX,COLORC875B7,COLORRED,NODRAW;
流量基线:=GJJ,COLOR00BBBB,COLORGREEN;
ZJLL:=REF(LLJX,1);
QZJJ:=(((LLJX - ZJLL) / ZJLL) * 100);
流量幅%:=IF(((LLJX > 0) AND (ZJLL < 0)),ABS(QZJJ),IF((((LLJX < 0) AND (ZJLL < 0)) AND (LLJX < ZJLL)),(0 - QZJJ),QZJJ))COLORMAGENTA,NODRAW;
流量幅:=流量幅%/10;
能量强度:流量幅%,NODRAW;
DRAWTEXT((流量幅%>2),70,'强度'),COLORWHITE;





回复

举报

QQ|

GMT+8, 2024-11-16 08:06

快速回复 返回顶部 返回列表