通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信量价指标公式副图买入无未来
Var1:=IF(YEAR=2000 AND MONTH=12 AND DAY=30,0,1);
Var2:=INDEXA/100000000;
Var3:=INDEXADV;
Var4:=INDEXDEC;
Var5:=Var3/(Var3+Var4)*Var2;
Var6:=Var4/(Var3+Var4)*Var2;
Var7:=EMA(Var5,P1);
Var8:=EMA(Var6,P1);
Var9:=EMA(Var7,P2);
VarA:=EMA(Var8,P3);
XF: EMA(Var7,3)*Var1;
ML1: EMA(Var9,6)*Var1;
ML2: EMA(VarA,2)*Var1;
ML: ML1-ML2*Var1, VOLSTICK;N:=5;N2:=1;
总手:VOL,VOLSTICK,COLORFFFF00;
均价:AMOUNT/VOL/100,COLOR6699CC;
预换手%:MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1))/CAPITAL*100,COLORFFFF00;
价成比%:(C-(SUM(AMOUNT,N)/SUM(VOL,N)/100))/(SUM
(AMOUNT,N)/SUM(VOL,N)/100)*100,COLOR6699CC;
Y值:(MA(C,13)-MA(C,55))/MA(C,13)*100,COLORFFFF00;
龙:WINNER(CLOSE)-COST(50)/CLOSE,COLOR6699CC;
换手3:IF(N2=1,CAPITAL*0.03,0),COLORBROWN;
换手5:IF(N2=1,CAPITAL*0.05,0),COLORBROWN;
换手7:IF(N2=1,CAPITAL*0.07,0),COLORBROWN;
换手10:IF(N2=1,CAPITAL*0.10,0),COLORBROWN;
MA1:MA(VOL,5),COLORWHITE;
MA2:MA(VOL,40),COLORMAGENTA;
预测量:STICKLINE(DYNAINFO(7)=CLOSE AND DYNAINFO(10)=AMOUNT,VOL,MAX(VOL,DYNAINFO(17)*REF(MA(VOL,5),1)),7,1),COLORGREEN;
年内天量:STICKLINE(VOL=HHV(VOL,250) AND N2=1,VOL*1.1,VOL*1.18,7,1),COLORBROWN;
跌停:DRAWTEXT((C-REF(C,1))/REF(C,1)=-0.094 AND N2=1,VOL*1.28,'↓');
涨停:DRAWTEXT((C-REF(C,1))/REF(C,1)=0.094 AND N2=1,VOL*1.28,'↑');
ma5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA30:MA(CLOSE,30);
MA60:MA(CLOSE,60);
stICKLINE(C>REF(C,1),H,L,0,1),COLOR0000FF;
STICKLINE(C>REF(C,1),O,C,3.2,0),COLOR000055;
STICKLINE(C>REF(C,1),O,C,2.7,0),COLOR000077;
STICKLINE(C>REF(C,1),O,C,2.1,0),COLOR000099;
STICKLINE(C>REF(C,1),O,C,1.5,0),COLOR0000BB;
STICKLINE(C>REF(C,1),O,C,0.9,0),COLOR0000DD;
{STICKLINE(C=(10-0.01*100/WCB2),1,0);
STICKLINE(涨停,OPEN,CLOSE,4.2,0),COLORYELLOW;
STICKLINE(涨停,H,L,2.7,0),COLORLIMAGENTA;
跌停:=IF((WCB2-C)*100/WCB2>=(10-0.01*100/WCB2),1,0);
STICKLINE(跌停,OPEN,CLOSE,4.2,0),COLORYELLOW;
STICKLINE(跌停,H,L,2.7,0),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D;
kd:=crOSS(K,D)ANDCROSS(J,D);
X:=LLV(J,2)=LLV(J,8);
Y:=IF(CROSS(J,REF(J+0.01,1))ANDXANDJ=HHV(XD,N1),XD,XD=HHV(XD,N1),XD,XDREF(1,XD);
JRS1:=DRAWICON(TJ1ANDTJ2,XD,1);
JRS2:=DRAWICON(TJ0ANDTJ3,XD,2);
DRAWICON(FILTER(JRS1>0,1),L*0.97,1);
DRAWICON(FILTER(JRS2>0,1),H*1.02,2);
空:=EMA(C,5);
均衡:=EMA(空,5);
中轨:=HHV(MA(H,13),13),LINETHICK2;
VAR55:=FILTER(均衡>REF(均衡,1)AND中轨REF(C,1),11);
DRAWTEXT(VAR55,L*0.98,'♂追涨'),COLORYELLOW;
HH0:=CONST(HHV(H,120))*1;
LL0:=CONST(LLV(L,120))*1;
MM0:=CONST((HH0+LL0)/2);
HH1:=IF(CONST(C)=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2.5,0),COLORFF33BB;
STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1.5,0),COLORFF55FF;
STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,0.3,0),COLORFF99FF;
STICKLINE(C1.099,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,2,0),COLORRED;
STICKLINE(C/REF(C,1)=2*REF(V,1),VZ,VY,0.9,0),COLORGREEN;
STICKLINE(V>=3*REF(V,1),VZ,VY,0.6,0),COLOR3300CC;
MA13:=MA(C,3);
UU:=1,VREF(MA13,1);
TJ:=1,REF(V,1)REF(MA13,1),COLORRED,LINETHICK3;
地:=(0-HLMN3)*HLMN2/HLMN4+HLMN1-0.7,COLORBLacK;
天:=CONST(HHV(C,120))*1+0.7,COLORBLACK;
bias11:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS12:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS13:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
短跌BIAS:IF(BIAS11=6,天,天+0.6),COLORBLACK,LINETHICK2;
中涨BIAS:IF(BIAS12>=10,天,天+0.6),COLORBLUE,LINETHICK2;
长涨BIAS:IF(BIAS13>=16,天,天+0.6),COLORRED,LINETHICK2;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
[源码注释]通达信公式动态翻译结果
RSV赋值:(((收盘价 – 9日内最低价的最低值) / (9日内最高价的最高值 – 9日内最低价的最低值)) * 100)
K赋值:RSV的3日[1日权重]移动平均
D赋值:K的3日[1日权重]移动平均
J赋值:3*K-2*D
X赋值:2日内J的最低值=8日内J的最低值
XG1赋值:J上穿1日前的J+0.01 AND X AND J<19
SR1赋值:(收盘价-收盘价的5日简单移动平均)/收盘价的5日简单移动平均*100
SR4赋值:SR1上穿-5
SR5赋值:SR1上穿-8
SR7赋值:SR4 OR SR5
输出马上反弹:SR7 AND SR7的5日过滤 AND XG1
每日通达信公式解答:
公式编写要求:
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);DPYJ:=(K+D)/2,LINETHICK2;基本线:=EMA(DPYJ,5)/1.5;基本线2:=EMA(DPYJ,2)/1.5,COLORRED;AAA:=(C*2+H+L)/4*10;DF:EMA(AAA,13)-EMA(AAA,34);DEAA:EMA(DF,5);MACD:2*(DF-DEAA)*5.5,COLOR00FFFF,LINETHICK2;MACDFS:=IF(MACD<=0,MACD,0),COLOR00FF00,LINETHICK2;STICKLINE(MACDFS>REF(MACDFS,1),MACDFS,0,1,0),COLOR00FF00;MACDZS:=IF(MACD>=0,MACD,0),COLORFF00FF,LINETHICK2;STICKLINE(MACDZS>REF(MACDZS,1),MACDZS,0,1,0),COLORFF00FF;VAR2AAA:=REF(LOW,1);VAR3AAA:=SMA(ABS(LOW-VAR2AAA),13,1)/SMA(MAX(LOW-VAR2AAA,0),13,1)*100;VAR4AAA:=EMA(IF(CLOSE*1.2,VAR3AAA*13,VAR3AAA/13),13);VAR5AAA:=LLV(LOW,34);VAR6AAA:=HHV(VAR4AAA,34);VAR7AAA:=IF(LLV(LOW,56),1,0);VAR8AAA:=EMA(IF(LOW<=VAR5AAA,(VAR4AAA+VAR6AAA*2)/2,0),3)/618*VAR7AAA;VAR9AAA:=EMA(CLOSE,5);VAR10A:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(10);VAR11A:=EMA(IF(LOW<=VAR5AAA,(VAR4AAA+VAR6AAA*2)/2,0),3)/618*VAR7AAA*(-1);VAR12A:=EMA(CLOSE,5)*(-1);减仓:=IF(VAR12A<REF(VAR12A,1),VAR12A,0),COLOR10E410,LINETHICK1;增仓:IF(VAR9AAA<REF(VAR9AAA,1),VAR9AAA*0.2,0),COLOR1010FF,LINETHICK1;主力进场:IF(VAR8AAA>REF(VAR8AAA,1),VAR8AAA*4,0),COLOR10FFFF,LINETHICK1;洗盘:=IF(VAR11A>REF(VAR11A,1),VAR11A*8,0),COLORFFF810,LINETHICK1;主力持仓:=LOW,COLORFF10FF,LINETHICK0;增减力度:=VAR10A*5,COLORWHITE;XL1:=MA(LOW,2)*0.96;XL2:=MA(LOW,26)*0.85;XL3:=REF(XL1,1)<XL2ANDREF(XL1,1)<XL1ANDREF(XL1,1)<REF(XL1,2);STICKLINE(XL3,0,VAR8AAA*3,4,0),COLOR006EFF;DRAWTEXT(XL3,VAR8AAA*2,'买'),COLOR0000FF;↑买:DRAWICON(XL3,VAR8AAA*3,4),COLORRED;V0:=0,COLORFFA2AF;洗盘启动:(MACD>0ANDMACD<REF(MACD,1)AND增减力度>REF(增减力度,1)AND增减力度>0)*10;强区:增减力度>REF(增减力度,1)ANDMACD>REF(MACD,1);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));A:=REF(C,1);RSI:=SMA(MAX(C-A,0),6,1)/SMA(ABS(C-A),6,1)*100;A1:=(C/MA(C,5)-1)*100<-10;A2:=(C/MA(C,13)-1)*100<-10;A3:=(C/MA(C,34)-1)*100<-15;A4:=RSI<18;A5:=CCI<-120;A6:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=1;底部:(A1ANDA2ANDA3ANDA4ANDA5ANDA6)*20,COLOR00FFFF,LINETHICK2;波段线:=5*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-3*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)-SMA(SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),2,1),LINETHICK1,COLORRED;M1:=EMA(MA(波段线,5),3);STICKLINE(波段线>108AND波段线>=M1,MACD,MACD,5,0),COLORF0F000;STICKLINE(波段线<0AND波段线<M1,MACD,0,2,0),COLORF00FF0;启动:(FILTER((CROSS((EMA(CLOSE,2)-EMA(CLOSE,10)),EMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2))ANDEMA((EMA(CLOSE,2)-EMA(CLOSE,10)),2)<0ANDCROSS(C,MA(C,20))),90))*20;A7A:=C-REF(C,1);A8A:=100*EMA(EMA(A7A,6),6)/EMA(EMA(ABS(A7A),6),6);进:((LLV(A8A,2)=LLV(A8A,7)ANDMACD>REF(MACD,1)ANDCOUNT(A8A<0,2)ANDCROSS(A8A,MA(A8A,2))))*20,COLORRED;倍量:((V>REF(V,1)*1.91)ANDC>REF(C,1))*5;AA1A:=VOL<REF(LLV(VOL,21),1);AA2A:=VOL<REF(LLV(VOL,55),1);AA3A:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05;STICKLINE(倍量,0,V/50000,2,0),COLORYELLOW;
公式编写方法:
A7A:=C-REF(C,1);
A8A:=100*EMA(EMA(A7A,6),6)/EMA(EMA(ABS(A7A),6),6);
进:((LLV(A8A,2)=LLV(A8A,7)ANDMACD>REF(MACD,1)ANDCOUNT(A8A<0,2)AND
CROSS(A8A,MA(A8A,2))))*20;
评论(0)