通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信月线倍量选股指标公式
DIF:=EMA(CLOSE,8)-EMA(CLOSE,13);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
A1:=MA(C,5);
A2:=MA(C,10);
A3:=MA(C,30);
A4:=COUNT(A1>A2ANDA2>A3,3)=3ANDREF(A3,1)<REF(A3,2)ANDA3>REF(A3,1);
A5:=CROSS(C,A4)ORC>A4;
A6:=VOL>MA(VOL,5);
选股:A4ANDA5ANDA6ANDCROSS(DIF,DEA);
VAR1:=CLOSE>REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR2:=REF(VAR1,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR3:=REF(VAR2,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR4:=REF(VAR3,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR5:=REF(VAR4,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR6:=REF(VAR5,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR7:=REF(VAR6,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR8:=REF(VAR7,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR9:=REF(VAR8,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VARA:=REF(VAR9,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VARB:=REF(VARA,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VARC:=REF(VARB,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VARD:=CLOSE<REF(CLOSE,1)ANDCLOSE<REF(CLOSE,2);
VARE:=REF(VARD,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VARF:=REF(VARE,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR10:=REF(VARF,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR11:=REF(VAR10,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR12:=REF(VAR11,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR13:=REF(VAR12,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR14:=REF(VAR13,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR15:=REF(VAR14,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR16:=REF(VAR15,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR17:=REF(VAR16,1)ANDCLOSE<=REF(CLOSE,1)ANDCLOSE>REF(CLOSE,2);
VAR18:=REF(VAR17,1)ANDCLOSE>REF(CLOSE,1)ANDCLOSE<=REF(CLOSE,2);
VAR19:=REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1)ANDVAR1;
X1:=EMA(C,4);
X2:=REF(X1,1);
X3:=EMA(C,10);
X4:=REF(X3,1);
X5:=EMA(C,30);
X6:=REF(X5,1);
四日线斜率:=((X1-X2)/X2*100)*10;
十日线斜率:=((X3-X4)/X4*100)*10;
三十线斜率:=((X5-X6)/X6*100)*10;
涨幅:=(C/REF(C,1)-1)*100;
量比:=V/REF(MA(V,5),1);
XG:REF(四日线斜率,1)<0ANDREF(十日线斜率,1)<0ANDREF(四日线斜率,1)<REF(十日线斜率,1)ANDREF(十日线斜率,1)<REF(三十线斜率,1)ANDCROSS(四日线斜率,十日线斜率);
{VAR19;}
VAR1A:=REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBORVARC,1)ANDVARD;
AAF:=LLV(LOW,34);
BBF:=IF(VAR19>0,MA(AAF,4)*1.06,MA(AAF,4));
MA6:=MA(C,6);
MA18:=MA(C,21);
买进价:=((C-REF(MA6,1))/6+MA6)*1.004;
买进条件:=CROSS(C,买进价)AND买进价>REF(买进价,1);
加码价:=((C-REF(MA18,1))/18+MA18)*1.004;
黄K加码:=CROSS(C,加码价)AND加码价>REF(加码价,1);
VAR31:=LLV(LOW,21);
VAR42:=HHV(HIGH,21);
K:=EMA((CLOSE-VAR31)/(VAR42-VAR31)*100,6);
D:=EMA(0.667*REF(K,1)+0.333*K,2);
(买进条件OR黄K加码)ANDVAR19=1;
SHORT:=12;
LONG:=26;
MID:=9;
-100,COLORF7C8DA;
HJ_01:=REF(LOW,1);
HJ_02:=SMA(ABS(LOW-HJ_01),3,1)/SMA(MAX(LOW-HJ_01,0),3,1)*100;
HJ_03:=EMA(IF(CLOSE*1.3,HJ_02*10,HJ_02/10),3);
HJ_04:=LLV(LOW,30);
HJ_05:=HHV(HJ_03,30);
HJ_06:=IF(MA(CLOSE,58),1,0);
火焰山:=EMA(IF(LOW<=HJ_04,(HJ_03+HJ_05*2)/2,0),3)/618*HJ_06;
吸筹:=IF(火焰山>100,1,火焰山/100);
紫气东来:STICKLINE(吸筹>-150AND火焰山>REF(火焰山,1),0,吸筹,4,1),COLORLIBLUE;
紫气东升:STICKLINE(吸筹>-150AND火焰山<REF(火焰山,1),0,吸筹,2,1),COLORYELLOW;
DIFF:=EMA(C,12)-EMA(C,26),COLORRED,LINETHICK2;
DEAA:=EMA(DIFF,9),COLORMAGENTA,LINETHICK2;
SR1:=REF(HIGH,10)=HHV(HIGH,2*10+1);
SR2:=FILTER(SR1,10);
SR3:=BACKSET(SR2,10+1);
HD:=FILTER(SR3,10);
前高:=REF(H,BARSLAST(HD));
倍量:=VOL/REF(VOL,1)>=1.9;
突破前高:=CROSS(C,前高);
选股:倍量AND突破前高;
{STICKLINE(MACD>0,0,MACD,1,0),COLORRED;}
STICKLINE(MACD>=REF(MACD,1)ANDMACD>0,0,MACD,3.5,0),COLOR001B9C;
STICKLINE(MACD>=REF(MACD,1)ANDMACD>0,0,MACD,3.3,0),COLOR0023CE;
STICKLINE(MACD>=REF(MACD,1)ANDMACD>0,0,MACD,2.2,0),COLOR012CFF;
STICKLINE(MACD>=REF(MACD,1)ANDMACD>0,0,MACD,1.1,0),COLOR3355FF;
STICKLINE(MACD<REF(MACD,1)ANDMACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<0,0,MACD,1,1),COLORGRAY;
STICKLINE(MACD>REF(MACD,1)ANDMACD<0,0,MACD,2,1),COLORLIGRAY;
DIF:EMA(C,12)-EMA(C,26),COLOR7ED62B,LINETHICK1;
DEA:=EMA(DIF,9),COLORYELLOW,LINETHICK1;
海底火焰山:火焰山,COLORRED,NODRAW;
DRAWICON(DIF<-100AND(MACD<5ANDMACD>-5),0,24);
DRAWICON(DIF<-100AND(MACD<5ANDMACD>-5),-100,24);
DRAWICON(DIF<-100AND(MACD<5ANDMACD>-5),-200,24);
[源码注释]通达信公式动态翻译结果
B1赋值:收盘价的240日指数移动平均
B2赋值:收盘价的520日指数移动平均
B3赋值:B1-B2
输出WDIF:收盘价的240日指数移动平均+B3,线宽为1
如果WDIF>=1日前的WDIF,返回WDIF,否则返回无效数,画红色,线宽为1
如果WDIF<=1日前的WDIF,返回WDIF,否则返回无效数,画蓝色,线宽为2
输出WDEA:WDIF的180日指数移动平均,画绿色,线宽为1
ZB1赋值:收盘价的60日指数移动平均
ZB2赋值:收盘价的130日指数移动平均
ZB3赋值:ZB1-ZB2
ZDIF赋值:收盘价的60日指数移动平均+ZB3,线宽为2,COLORF00FF0
ZDEA赋值:ZDIF的45日指数移动平均,画绿色,线宽为1
ZMACD赋值:ZDIF*2-ZDEA
输出Z平滑:ZMACD的3日[1日权重]移动平均
画带状线
MACD赋值:WDIF*2-WDEA
输出平滑:MACD的3日[1日权重]移动平均
画带状线
买点赋值:如果MACD上穿WDIF,返回1,否则返回0
当满足条件买点时,在WDIF*1.0位置画1号图标
卖点赋值:如果WDIF上穿MACD,返回1,否则返回0
当满足条件卖点时,在WDIF*1.0位置画2号图标
Z1赋值:字符串相加
Z2赋值:字符串相加
Z3赋值:字符串相加
当满足条件是否最后一个周期时,在横轴0纵轴0位置书写文字,画白色
每日通达信公式解答:
编写要求:
去除回补当天向上跳空选股公式。也就是当天跳空高开补缺口了就去除。
公式在线网解答:
xg:not(o>ref(h,1)andl<ref(h,1));
评论(0)