通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、中线指标公式无未来
N:=8;
M:=13;
P:=60;
S:=3;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
超大主力吃:IF(V4>=0,V4,0),COLOR7F00FF,LINETHICK3;
超大主力吐:IF(V4<=0,V4,0),COLOR66FF00,LINETHICK2;
{通达信股票指标公式}
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
超大主力吃货线:8,COLORFF80FF,LINETHICK2,CROSSDOT;
VAR3:=100-(100-3*SMA((CLOSE-LLV(LOW,50))/(HHV(HIGH,50)-LLV(LOW,50))
*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,50))/(HHV(HIGH,50)-LLV(LOW,50))
*100,20,1),20,1));
VAR4:=100-(100-3*SMA((OPEN-LLV(LOW,50))/(HHV(HIGH,50)-LLV(LOW,50))
*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,50))/(HHV(HIGH,50)-LLV(LOW,50))
*100,20,1),20,1));
STICKLINE(VAR3<=REF(VAR4,1),VAR3,VAR4,4,0),COLORGREEN;
STICKLINE(VAR3>REF(VAR4,1),VAR3,VAR4,4,0),COLORRED;
Var3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
Var4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
Var5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
Var6:=(Var3+Var4+Var5)/3;
Var7:=EMA(Var6,5);
指标:EMA(EMA(Var3,5),5)*3,COLORSTICK;
Var8:=IF(Var6<=-20,10,0);
Var9:=HHV(Var8,10);
STICKLINE(Var8=10,20,10,5,0),COLOR6666FF;
VarA:=IF(Var9ANDCROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:EMA(Var7,5)*2,COLORff00ff;
D:EMA(K,5),colorwhite;
J:K*3-D*2,coloryellow;
VarB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5))ANDJ>10;
换手:VOL/CAPITAL*100,colorgreen;
DRAWTEXT(VarA=20,15,'底部'),linethick1,colorwhite;
STICKLINE((VarA=20),0,10,5,0),colorwhite;
VARC:=(ZIG(3,5)>REF(ZIG(3,5),1))AND
(REF(ZIG(3,5),1)<=REF(ZIG(3,5),2))AND(REF(ZIG
(3,5),2)<=REF(ZIG(3,5),3));
VARD:=(ZIG(3,5)<REF(ZIG(3,5),1))AND
(REF(ZIG(3,5),1)>=REF(ZIG(3,5),2))AND(REF(ZIG
(3,5),2)>=REF(ZIG(3,5),3));
STICKLINE((VARC=1),(-14),0,4,0),Color0000FF;
DRAWTEXT((VARC=1),(-14),'买'),Color0000FF;
STICKLINE((VARD=1),14,0,4,0),Color00FF00;
DRAWTEXT((VARD=1),18,'卖'),Color00FF00;
VarE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20
VarF:=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);
Var10:=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);
Var11:=VarFREF(VOL,1)AND
CLOSE>REF(CLOSE,1);
DRAWTEXT(Var11ANDCOUNT(Var11,30)=1,15,'大资金活动
'),linethick1,COLORff00ff;
STICKLINE(Var11ANDCOUNT(Var11,30)=1,1,10,5,0),colorff00ff;
Var12:=(HIGH+LOW+CLOSE)/3;
Var13:=(Var12-MA(Var12,14))/(0.015*AVEDEV(Var12,14));
Var14:=(Var12-MA(Var12,70))/(0.015*AVEDEV(Var12,70));
Var15:=IF(Var13>=150ANDVar13=150AND
Var14<200,10,0);
Var16:=IF(Var13-200ANDVar14<=-150AND
Var14>-200,-10,Var15);
Var17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
Var18:=100-ABS(Var17);
Var19:=IF(Var18<90,Var18,100);
Var1A:=IF(VarE>0,VarE,0);
Var1B:=IF(Var14>=200ANDVar13>=150,15,IF(Var14<=-200AND
Var13<=-150,-15,Var16))+60;
Var1C:=Var1A>48ANDVar1B>60ANDVar19<100;
DRAWTEXT(Var1CANDCOUNT(Var1C,30)=1,15,'大笔出货
'),linethick1,COLORffcc66;
STICKLINE(Var1CANDCOUNT(Var1C,30)=1,0,10,5,0),colorffcc66;
二、均线画线公式指标无未来
EMA3:EMA(C,3),COLORWHITE;
EMA47:EMA(C,47),LINETHICK0,COLORRED;
红线上涨:IF(EMA47>REF(EMA47,1),EMA47,DRAWNULL),LINETHICK2,COLORRED;
绿线下跌:IF(EMA47<=REF(EMA47,1),EMA47,DRAWNULL),LINETHICK2,COLORGREEN;
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
MA40:MA(C,40);
MA60:MA(C,60);
STICKLINE(MA5>=MA60ANDMA60>=MA10,MA10,MA60,4,0),COLORBLUE;
STICKLINE(MA5>=MA10ANDMA5<=MA60,MA10,MA5,4,0),COLORBLUE;
STICKLINE(MA20>=MA60ANDMA60>=MA40,MA40,MA60,4,0),COLORFF00FF;
STICKLINE(MA20>=MA40ANDMA20<MA60,MA40,MA20,4,0),COLORFF00FF;
STICKLINE(MA5>=MA20ANDMA20>=MA10,MA10,MA20,4,0),COLORWHITE;
STICKLINE(MA5>=MA10ANDMA5<MA20,MA10,MA5,4,0),COLORWHITE;
STICKLINE(C>=O,H,L,0,0),COLORRED;
STICKLINE(C<O,H,L,0,0),COLORFFFF52;
STICKLINE(C>=O,C,O,4,1),COLORRED;
STICKLINE(C<O,C,O,4,0),COLORFFFF52;
EMA13:EMA(C,13),COLOR0000FF,LINETHICK2;
EMA34:EMA(C,34),COLORYELLOW;
EMA55:EMA(C,55),COLORFF00FF;
EMA120:EMA(C,120),COLORFFCC66;
AR1:=EMA55>EMA34ANDEMA34>EMA13;
AR2:=BARSLAST((C-EMA13)/EMA13*100<-6);
AR3:=EMA13>=REF(EMA13,2);
AR4:=COUNT(CROSS(C,EMA13),AR2)=1;
AR5:=AR1ANDAR2ANDAR3ANDAR4;
AR6:=AR5ANDFILTER(AR5,10);
DRAWTEXT(AR6,L-0.09,'启动'),COLORYELLOW;
STICKLINE(AR6,H,L,0.5,1),COLORYELLOW;
STICKLINE(AR6,O,C,6,1),LINETHICK2,COLORYELLOW;
BR1:=COUNT(BETWEEN((C-REF(C,1))/REF(C,1)*100,0,5),5)=5;
BR2:=ABS((EMA13-EMA34)+(EMA34-EMA55))/C<0.2;
BR3:=C>EMA55AND(REF(C,1)<REF(EMA55,1)ORREF(C,2)<REF(EMA55,2)OR
REF(C,3)<REF(EMA55,3)ORREF(C,4)<REF(EMA55,4)ORREF(C,5)<REF(EMA55,5));
BR4:=BR1ANDBR2ANDBR3;
DRAWTEXT(BR4ANDFILTER(BR4,10),L-0.09,'上升'),COLOR00C5FF;
STICKLINE(BR4ANDFILTER(BR4,10),H,L,0.5,1),COLOR00C5FF;
STICKLINE(BR4ANDFILTER(BR4,10),O,C,6,1),LINETHICK2,COLOR00C5FF;
CR1:=(C-REF(C,1))/REF(C,1)*100>0.5;
CR2:=V>MA(V,5)*0.6;
CR3:=COUNT(CROSS(EMA13,EMA55),3)=1;
CR4:=ABS(EMA34-EMA55)/EMA55<0.03;
CR5:=EMA55=REF(EMA55,1);
CR6:=FILTER(CR1ANDCR2ANDCR3ANDCR4ANDCR5,2);
STICKLINE(CR6,H,L,0.5,1),COLORF00FF0;
STICKLINE(CR6,O,C,6,1),LINETHICK2,COLORF00FF0;
DRAWTEXT(CR6,L-0.09,'涨升'),COLORF00FF0;
DR1:=EMA13>EMA34ANDEMA34<EMA55;
DR2:=BARSLAST(CROSS(C,EMA55));
DR3:=H=HHV(H,DR2);
DR4:=BARSLAST(DR3);
DR5:=COUNT(O>CANDCEMA55AND
BETWEEN((C-EMA55)/EMA55,0,0.02),DR4)=1;
DR6:=C>REF(C,1);
DR7:=DR1ANDDR5ANDDR6;
DR8:=DR7ANDFILTER(DR7,10);
DRAWTEXT(DR8,L-0.09,'出击'),COLORD6BA63;
STICKLINE(DR8,H,L,0.5,1),COLORD6BA63;
STICKLINE(DR8,O,C,6,1),LINETHICK2,COLORD6BA63;
ER:=BARSLAST(REF(CROSS(EMA55,EMA34),1))ANDCROSS(EMA34,EMA55);
DRAWTEXT(ER,L-0.09,'金叉'),COLOR0099FF;
STICKLINE(ER,H,L,0.5,1),COLOR0099FF;
STICKLINE(ER,O,C,6,1),LINETHICK2,COLOR0099FF;
FR:=BARSLAST(REF(CROSS(EMA34,EMA13),1))ANDCROSS(EMA13,EMA34);
DRAWTEXT(FR,L-0.09,'加仓'),COLORWHITE;
STICKLINE(FR,H,L,0.5,1),COLORWHITE;
STICKLINE(FR,O,C,6,1),LINETHICK2,COLORWHITE;
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));
GR2:=EMA13>EMA34ANDEMA34>EMA55ANDEMA13>REF(EMA13,1);
GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10ANDH=HHV(H,GR1),GR1);
GR4:=H=HHV(H,GR1);
GR5:="MACD.MACD"(12,26,9)<REF("MACD.MACD"(12,26,9),1);
GR6:=GR2ANDGR3ANDGR4;
GR7:=GR2ANDGR3ANDGR4ANDGR5;
DRAWTEXT(GR6ANDGR7,H+0.13,'了结'),COLOR00FF00;
STICKLINE(GR6ANDGR7,H,H+0.09,4,0),COLOR00FF00;
HR2:=EMA13>=REF(EMA13,3)ANDEMA34>=REF(EMA34,1)AND
EMA55>=REF(EMA55,1)ANDCROSS(C,EMA13)ANDCROSS(C,EMA34)AND
CROSS(C,EMA55);
DRAWTEXT(HR2ANDFILTER(HR2,10),L-0.09,'推进'),COLORFFC8FF;
STICKLINE(HR2ANDFILTER(HR2,10),H,L,0.5,1),COLORFFC8FF;
STICKLINE(HR2ANDFILTER(HR2,10),O,C,6,1),LINETHICK2,COLORFFC8FF;
[源码注释]通达信公式动态翻译结果
A1赋值: 上次(收盘价/1日前的收盘价-1)*100>9.5距今天数
A2赋值: 如果A1日前的最低价>A1+1日前的最高价,返回A1+1日前的收盘价,否则返回A1日前的开盘价
A3赋值: A1位于2和13之间
A9赋值:收盘价的5日简单移动平均>=A2 AND 收盘价>A2 AND 收盘价>=收盘价的5日简单移动平均 AND 1日前的收盘价<=1日前的收盘价的5日简单移动平均AND A1日内最低价的最低值<A2*1.045
输出买入:1日前的A3>0 AND A9
推荐阅读:短线指标公式无未来
P:=6;N:=10;
A:=(C+L+O+H)/4;
XSX:=(A-MA(A,N));
DS:=BACKSET(XSX<REF(XSX,1),2);
A3:=REF(XSX,P)=HHV(XSX,2*P+1);
B3:=FILTER(A3,P);C3:=BACKSET(B3,P+1);
D3:=FILTER(C3,P);
A4:=REF(XSX,P)=LLV(XSX,2*P+1);
B4:=FILTER(A4,P);C4:=BACKSET(B4,P+1);
D4:=FILTER(C4,P);
SS:=REF(XSX,BARSLAST(D3));
XX:=REF(XSX,BARSLAST(D4));
R11:=BACKSET(ISLASTBAR,BARSLAST(D3)+1);
S11:=R11>REF(R11,1);
T11:=BACKSET(ISLASTBAR,BARSLAST(D4)+1);
U11:=T11>REF(T11,1);
{以下为显示}
趋势:XSX,COLOR0033DD,LINETHICK2;
观望:IF(DS,XSX,DRAWNULL),LINETHICK2,COLOR00DD00;
支撑:DRAWLINE(D4,XSX,U11,XSX,1),COLOR9900DD;
压力:DRAWLINE(D3,XSX,S11,XSX,1),COLOR00DDDD;
高点:IF(C>0,SS,DRAWNULL),CROSSDOT,COLOR999900;
低点:IF(C>0,XX,DRAWNULL),CROSSDOT,COLOR999999;
VAR1:=1;
VAR2:=(2*CLOSE+HIGH+LOW)/4;
天:80,POINTDOT;
人:20;
VAR3:=IF(YEAR>=2099ANDMONTH>2,0,1);
VAR4:=LLV(LOW,5);
VAR5:=HHV(HIGH,4);
散户:EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3*VAR1;
庄家:EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3*VAR1;
VAR6:=(HHV(HIGH,4)-VAR2)/(HHV(HIGH,4)-LLV(LOW,4))*100-72;
VAR7:=(VAR2-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;
倒影:SMA(VAR6,4,1)*VAR1;
VAR8:=SMA(VAR7,2,1);
黄山:SMA(VAR8,2,1)*VAR1;
地平线:12;
DRAWTEXT(CROSS(散户,庄家)AND散户<50AND29<散户,20,'短进'),COLOR00FF00;
DRAWTEXT(CROSS(庄家,散户)AND散户>40AND71>散户,50,'短出'),COLOR00FFFF;
DRAWTEXT(CROSS(散户,庄家)AND散户<30,0,'逢低吸'),COLOR3399CC;
DRAWTEXT(CROSS(庄家,散户)AND散户>70,75,'逢高减'),COLORFFFF33;
DRAWICON(CROSS(散户,庄家)AND散户<30,20,1);
DRAWICON(CROSS(庄家,散户)AND散户>70,80,2);
VAR9:=CLOSE-REF(CLOSE,5);
VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5)*100;
VARB:=EMA(EMA(VAR9,10),10)/EMA(EMA(ABS(VAR9),10),10)*100;
VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20)*100;
卖出:IF(VARA>0ANDCROSS(VARC,VARA),-40,0);
DRAWTEXT(卖出,-30,'反弹减仓!'),COLOR0033FF;
DRAWICON(卖出<0,-25,2);
A1:=REF(C<O,2);
A2:=REF(C<O,1);
A3:=C>OANDC>=REF(O,1)ANDVOL/REF(VOL,1)>=0.5;
XG:A1ANDA2ANDA3ANDREF(VOL,1)>REF(VOL,2);
N:=5;M:=20;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
快:SMA(RSV,3,1),COLORGREEN;
慢:SMA(快,3,1);
极强:80,COLORRED;
中线:50,COLORLIBLUE;
极弱:20,COLORGREEN;
强势:IF(快>慢,快,DRAWNULL),LINETHICK2,COLORRED;
快慢比:快/慢,NODRAW;
介入:IF(快<M,30,0),COLORLIRED;
每日公式解答:
公式编写要求:
股价位于布林通道中线值上或下2%的公式。
公式编写方法:
M:=20;
BOLL:=MA(CLOSE,M);
BETWEEN(C/BOLL,0.98,1.02);
评论(0)