通达信股票软件填料的【MACD】源码 运用好了是不错的技术通达信公式

2018-02-01    来源:原创    编辑:翔博软件
问:如何才能每天都能免费收到这种原创好指标呢? 答:只需加微信:396950280申请加入爱公式VIP微信群即可,天天有更新! 公式源码: SJV:=FINANCE(34);{每股净资产} 市净率:C/S
问:如何才能每天都能免费收到这种原创好指标呢?

答:只需加微信:396950280申请加入爱公式VIP微信群即可,天天有更新!

公式源码:

 

SJV:=FINANCE(34);{每股净资产}

市净率:C/SJV,NODRAW,COLOR00FF00;

每股税后利润:=(FINANCE(1)/FINANCE(29));

市盈率:C/FINANCE(33),NODRAW,COLORFFFF00;

DIF:=EMA(CLOSE,10)-EMA(CLOSE,22);

DE:=EMA(DIF,7.5);

MACDA:=2*(DIF-DE),;

HZL:=CROSS(MACDA,0);

LZH:=CROSS(0,MACDA);

BC:=BARSLAST(HZL OR LZH)+1;

ZGHZ:=IF(MACDA>0,HHV(MACDA,BC),0);

ZGLZ:=IF(MACDA<0,LLV(MACDA,BC),0);

DRAWBAND(ZGHZ,RGB(105,77,77),0,RGB(77,77,77));

DRAWBAND(ZGLZ,RGB(80,0,0),0,RGB(66,88,66));

DIFF:EMA(CLOSE,10)-EMA(CLOSE,22),COLORFFFFFF;

DEA:EMA(DIFF,7.5),COLOR00FFFF;

MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK0;

STICKLINE(MACD>0 AND MACD>REF(MACD,1),0,MACD,1.5,1),COLORRED;

STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,1.5,0),COLOR90FF00;

STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,1.5,1),COLOREFFF00;

STICKLINE(MACD<0 AND MACD>REF(MACD,1),0,MACD,1.5,0),COLORFFAAFF;

STICKLINE(MACD>0 AND MACD=HHV(MACD,BARSLAST(MACD<0)) AND MACD>=REFX(MACD,1) AND MACD>=REFX(MACD,2),MACD,MACD*0.5,0.6,1),COLOR00F0FF;

STICKLINE(MACD<0 AND MACD=LLV(MACD,BARSLAST(MACD>0)) AND MACD<=REFX(MACD,1) AND MACD<=REFX(MACD,2),MACD,MACD*0.5,0.6,1),COLORFFAAFF;

A1:=LLV(MACD,30);

A2:=A1=MACD;

A3:=BARSLAST(A2);

A4:=REF(MACD,A3);

B1:=HHV(MACD,30);

B2:=B1=MACD;

B3:=BARSLAST(B2);

B4:=REF(MACD,B3);

STICKLINE(A3,A4,A4,10,0),COLOR999999;{MACD最低柱线的最高位置画线}

STICKLINE(B3,B4,B4,10,0),COLOR999999;{MACD最高柱线的最高位置画线}

↑:TROUGHBARS(3,3,1),COLOR0000FF,NODRAW;

↓:PEAKBARS(3,3,1),COLOR00FF00,NODRAW;

低:IF(↑=0,DIFF,IF(↓<↑,TROUGH(3,3,1),REF(TROUGH(3,3,1),1))),COLOR00FFFF,NODRAW;

高:IF(↓=0,DIFF,IF(↑<↓,PEAK(3,3,1),REF(PEAK(3,3,1),1))),COLOR00FF00,NODRAW;

STICKLINE(↑=0 AND DIFF<0 AND DIFF<DEA,0,DIFF,0,0),COLORFFAAFF;

STICKLINE(↓=0 AND DIFF>0 AND DIFF>DEA,DIFF,0,0,0),COLOR00FF00;

DRAWTEXT(↑=0 AND DIFF<0 AND DIFF<DEA,DIFF,'低'),COLORFFAAFF;

DRAWTEXT(↓=0 AND DIFF>0 AND DIFF>DEA,DIFF,'高'),COLOR00FF00;

低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;

JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));

二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;

AA1:=BARSLAST(REF(CROSS(DIFF,DEA),1));

底背离:=(REF(L,AA1+1)>L OR REF(C,AA1+1)>C) AND (L,DIFF)>REF((L,DIFF),AA1+1) AND CROSS(DIFF,DEA);

DRAWLINE(AA1=0,DEA,底背离,DEA,0),COLOR0000FF,LINETHICK1;

AA2:=BARSLAST(REF(CROSS(DEA,DIFF),1));

顶背离:=(REF(C,AA2+1)<C OR REF(H,AA2+1)<H) AND REF((H,DIFF),AA2+1)>(H,DIFF) AND CROSS(DEA,DIFF);

DRAWLINE(AA2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1;

DRAWICON(CROSS(DIFF,DEA) AND DIFF>0,DEA,36);

DRAWICON(CROSS(DEA,DIFF) AND DIFF>0,DEA,37);

DRAWICON(CROSS(DIFF,DEA) AND DIFF<0,DEA,1);

DRAWICON(二次金叉,DEA*0.9,36) ;

解盘1:=CONST(IF(MACD>0,1,0));

解盘2:=CONST(IF(MACD<0,1,0));

解盘A:=IF(解盘1=1,'【精华8个字 买小卖小,缩头缩脚】 当股价一波比一波高时,反而红柱的堆,

一堆比一堆小,证明产生了顶背离现象,应该及时卖出',

IF(解盘2=1,'【精华8个字 买小卖小,缩头缩脚】 当股价一波比一波低时,

反而绿柱的堆一堆比一堆小,证明产生了底背离,应该买进',

DRAWNULL));

DRAWTEXT_FIX((解盘1=1 OR 解盘2=1),0.16,0,0,解盘A),COLORFFEE00;

通达信手机版公式导入方法

一、进入公式编辑器界面

1、点击进入公式编辑器

2、点击指标编辑,选择新建指标

二、按照上面所发布的指标公式源码,进行复制填写

1、填写公式名称、描述、指标说明,填好后点左上角公式按键

2、然后点公式,对公式源码进行复制黏贴

3、填好后,点击测试公式,通过后点击保存,公式编辑就结束了

三、进入主界面选择公式,即可使用。

1、点击进入指标选择

2、在指标选择中的用户指标栏,根据所需选择自编公式

特别提示:

选股预警指标编写 ,不同主流行情软件间指标转换。 请联系微信:396950280

一个聚百万原创指标公式圈子

 

原创价值分享公众号

ID:yungongshi

1
3
点击进入翔博软件旗下官方微店--指标超市