您的位置: 零点财经>股票公式>通达信指标公式> 通达信MACD背离提示主图指标公式源码详解

通达信MACD背离提示主图指标公式源码详解

2019-06-20 21:59:20  来源:通达信指标公式  本篇文章有字,看完大约需要18分钟的时间

通达信MACD背离提示主图指标公式源码详解

时间:2019-06-20 21:59:20  来源:通达信指标公式

学会这个方法,抓10倍大牛股的概率提升10倍>>

通达信MACD背离提示主图指标公式源码详解

{0. 将MACD指标搬上主图显示}

DRAWGBK(C>0,RGB(0,50,9),RGB(0,0,0),0,'0',0);

STICKLINE(C>=O,C,O,3,0),COLOR000045;

STICKLINE(C>=O,C,O,2.5,0),COLOR000065;

STICKLINE(C>=O,C,O,2,0),COLOR000085;

STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;

STICKLINE(C>=O,C,O,1,0),COLOR0000C5;

STICKLINE(C>=O,C,O,0.5,0),COLOR0000E5;

STICKLINE(C>=O,H,L,0,0),COLOR0000F5;

STICKLINE(C<O,C,O,3,0),COLOR353500;

STICKLINE(C<O,C,O,2.5,0),COLOR454500;

STICKLINE(C<O,C,O,2,0),COLOR555500;

STICKLINE(C<O,C,O,1.5,0),COLOR656500;

STICKLINE(C<O,C,O,1,0),COLOR757500;

STICKLINE(C<O,C,O,0.5,0),COLOR858500;

STICKLINE(C<O,H,L,0,0),COLOR959500;

DDIF:EMA(CLOSE,12)-EMA(CLOSE,26),NODRAW;

DDEA:EMA(DDIF,9),NODRAW;

DMACD:(DDIF-DDEA)*2,NODRAW;

上市天数:=BARSCOUNT(C); N:=IF(上市天数<90,上市天数-1,90);

基点:=CONST(LLV(L,N)); 基:=CONST(HHV(H,N))-基点;

分:=CONST(LLV(DDIF,N)); 百:=CONST(HHV(DDIF,N))-分;

CC比:=(DDIF-分)/百; XCX:=CC比*基+基点;

DIF:=XCX; NOTEXTDDIF:DIF,COLORWHITE;

DEA:=EMA(DIF,9); NOTEXTDDEA:DEA,COLORYELLOW;

基准零线:=(0-分)/百*基+基点; NOTEXT基准零线:基准零线,POINTDOT,COLORLIRED;

MACD:=(DIF-DEA)*2;

STICKLINE(MACD>=0,基准零线,基准零线+MACD,0,0),COLORLIRED;

STICKLINE(MACD<0,基准零线,基准零线+MACD,0,0),COLORLICYAN;

{1. MACD结构量化指标:}

A1:=BARSLAST(REF(CROSS(DIF,DEA),1));

底部结构:=REF(C,A1+1)>C AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);

DRAWLINE(A1=0,REF(DEA,1),底部结构,REF(DEA,A1+1),0),COLORMAGENTA,LINETHICK1;

STICKLINE(底部结构,DEA,REF(DEA,A1+1),0,0),COLORMAGENTA,LINETHICK1;

DRAWTEXT(底部结构>0,REF(DEA,A1+1),'底背离'),COLORMAGENTA;

A2:=BARSLAST(REF(CROSS(DEA,DIF),1));

顶部结构:=REF(C,A2+1)<C AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);

DRAWLINE(A2=0,REF(DEA,1),顶部结构,REF(DEA,A2+1),0),COLORGREEN,LINETHICK1;

STICKLINE(顶部结构,DEA,REF(DEA,A2+1),0,0),COLORGREEN,LINETHICK1;

DRAWTEXT(顶部结构>0,REF(DEA,A2+1),'顶背离'),COLORGREEN;

{财务信息}

市盈率1:=DYNAINFO(39);

{净资收益率:=(FINANCE(33)/FINANCE(34)*100);}

营业收入:=FINANCE(20)/10000;

销售毛利率:=((FINANCE(20)-FINANCE(21))/FINANCE(20)*100);

净利润:=FINANCE(30)/10000;

净利润比率:=(FINANCE(30)/FINANCE(20)*100);

主营利润率1:=(FINANCE(23)/FINANCE(20)*100);

优质资产率:=((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19));{理论上越大越好但不同行业有不同标准};

现金负债比:=(FINANCE(25)/FINANCE(15));{缺长期负债或负债总额,理论上越大越好但不同行业有不同标准};

净利同增率:=FINANCE(43);

DRAWTEXT_FIX(1,0.42,0.10,1,'市盈率:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.15,1,'收入 万元:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.20,1,'销售毛利率:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.25,1,'净利 万元:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.30,1,'净利润率 :'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.35,1,'主营利润率:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.40,1,'优质资产率:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.42,0.45,1,'现金负债比:'),COLORYELLOW;

{DRAWTEXT_FIX(1,0.42,0.75,1,'净利同增率:'),COLORYELLOW;}

DRAWNUMBER_FIX(1,0.47,0.10,1,市盈率1),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.15,1,营业收入),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.20,1,销售毛利率),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.25,1,净利润),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.30,1,净利润比率),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.35,1,主营利润率1),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.40,1,优质资产率),COLORWHITE;

DRAWNUMBER_FIX(1,0.47,0.45,1,现金负债比),COLORWHITE;

{DRAWNUMBER_FIX(1,0.47,0.75,1,净利同增率),COLORWHITE;}

{DRAWTEXT_FIX(1,0.498,0.01,1,'财务指标:'),COLORRED;}

市净率:=CONST(DYNAINFO(7) / FINANCE(34));

{市销率:=CONST(FINANCE(1)*DYNAINFO(7)/FINANCE(20));}

营收同比增:=FINANCE(44);

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

每股收益季:=CONST(FINANCE(33)/(5-FINANCE(37)));

{每股收益年:=CONST(FINANCE(33));}

每股现金流:=CONST((FINANCE(25)/FINANCE(1)));

每股未分配:=CONST(FINANCE(32));

每股公积金:=CONST(FINANCE(18));

DRAWTEXT_FIX(1,0.54,0.10,1,'市净率 :'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.15,1,'收入同比增 :'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.20,1,'每股净资产:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.25,1,'净利同比增:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.30,1,'每股收益季:'),COLORYELLOW;

{DRAWTEXT_FIX(1,0.54,0.45,1,'每股收益年:'),COLORYELLOW;}

DRAWTEXT_FIX(1,0.54,0.35,1,'每股现金流:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.40,1,'每股未分配:'),COLORYELLOW;

DRAWTEXT_FIX(1,0.54,0.45,1,'每股公积金:'),COLORYELLOW;

DRAWNUMBER_FIX(1,0.57,0.10,1,市净率),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.15,1,营收同比增),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.20,1,每股净资产),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.25,1,净利同增率),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.30,1,每股收益季),COLORWHITE;

{DRAWNUMBER_FIX(1,0.57,0.45,1,每股收益年),COLORWHITE;}

DRAWNUMBER_FIX(1,0.57,0.35,1,每股现金流),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.40,1,每股未分配),COLORWHITE;

DRAWNUMBER_FIX(1,0.57,0.45,1,每股公积金),COLORWHITE;

CONST(C),COLORCYAN,DOTLINE;

{DRAWTEXT_FIX(ISLASTBAR,0.8,0.05,1,STRCAT(STRCAT('流通盘: ',CON2STR(流通市值,2)),'亿 总市值:'), STRCAT(STRCAT(DYBLOCK,' '),GNBLOCK))),COLORGREEN;};

阅读了该文章的用户还阅读了

热门关键词

相关阅读

为您推荐

移动平均线
股票知识
MACD
老丁说股
热点题材
KDJ指标
读懂上市公司
成交量
股票技术指标
股票大盘
分时图
股市名家
概念股
缠中说禅
强势股
波段操作
股票盘口
短线炒股
股票趋势
涨停板
股票投资
长线炒股
股票问答
股票术语
财务分析
炒股软件
上证早知道
经济学术语
期货
股票黑马
股票震荡市场
理财
炒股知识
散户炒股
外汇
炒股战术
港股
基金
黄金




































































































































































































































































































































































































































































































































































































































相关栏目推荐

栏目导航

友情链接

网站首页
股票问答
股票术语
网站地图

copyright 2016-2024 零点财经保留所有权 免责声明:网站部分内容转载至网络,如有侵权请告知删除 友链,商务链接,投稿,广告请联系qq:253161086

零点财经保留所有权

免责声明:网站部分内容转载至网络,如有侵权请告知删除