本文作者:指标公式网

[主图]通达信乾坤趋势主图指标 附源码 效果图

指标公式网 2024-10-10 82
[主图]通达信乾坤趋势主图指标 附源码 效果图摘要: 通达信主图指标名:通达信乾坤趋势主图指标指标效果图:指标源码及源码注释:X_1:=(3*CLOSE+LOW+OPEN+HIGH)/6;{计算收盘价、最低价、开盘价和最高价的加权平均...
通达信主图指标名:通达信乾坤趋势主图指标

指标效果图:

image.png

指标源码及源码注释:

X_1:=(3*CLOSE+LOW+OPEN+HIGH)/6;{计算收盘价、最低价、开盘价和最高价的加权平均值}

X_2:=EMA(X_1,13);{计算X_1的13日指数移动平均}

X_3:=EMA(X_2,3);{计算X_2的3日指数移动平均}

X_4:=EMA(X_3,3);{计算X_3的3日指数移动平均}

X_5:=EMA(X_4,3);{计算X_4的3日指数移动平均}

X_6:=EMA(X_5,3);{计算X_5的3日指数移动平均}

X_7:=EMA(X_6,3);{计算X_6的3日指数移动平均}

DRAWBAND(X_2,RGB(150,50,20),X_7,RGB(36,150,40));{绘制X_2和X_7之间的色带,颜色分别为RGB(150,50,20)和RGB(36,150,40)}

NOTEXTMB101:IF(X_2>X_3,X_2,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_2大于X_3时,绘制X_2的点线,颜色为品红}

NOTEXTMB102:IF(X_2< X_3,X_2,DRAWNULL),DOTLINE,COLORGREEN;{当X_2小于X_3时,绘制X_2的点线,颜色为绿色}

NOTEXTMB201:IF(X_3>X_4,X_3,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_3大于X_4时,绘制X_3的点线,颜色为品红}

NOTEXTMB202:IF(X_3< X_4,X_3,DRAWNULL),DOTLINE,COLORGREEN;{当X_3小于X_4时,绘制X_3的点线,颜色为绿色}

NOTEXTMB301:IF(X_4>X_5,X_4,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_4大于X_5时,绘制X_4的点线,颜色为品红}

NOTEXTMB302:IF(X_4< X_5,X_4,DRAWNULL),DOTLINE,COLORGREEN;{当X_4小于X_5时,绘制X_4的点线,颜色为绿色}

NOTEXTMB401:IF(X_5>X_6,X_5,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_5大于X_6时,绘制X_5的点线,颜色为品红}

NOTEXTMB402:IF(X_5< X_6,X_5,DRAWNULL),DOTLINE,COLORGREEN;{当X_5小于X_6时,绘制X_5的点线,颜色为绿色}

NOTEXTMB501:IF(X_6>X_7,X_6,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_6大于X_7时,绘制X_6的点线,颜色为品红}

NOTEXTMB502:IF(X_6< X_7,X_6,DRAWNULL),DOTLINE,COLORGREEN;{当X_6小于X_7时,绘制X_6的点线,颜色为绿色}

NOTEXTMB601:IF(X_7>REF(X_7,1),X_7,DRAWNULL),DOTLINE,COLORMAGENTA;{当X_7大于前一日X_7时,绘制X_7的点线,颜色为品红}

NOTEXTMB602:IF(X_7< REF(X_7,1),X_7,DRAWNULL),DOTLINE,COLORGREEN;{当X_7小于前一日X_7时,绘制X_7的点线,颜色为绿色}

X_8:=(20*X_1+19*REF(X_1,1)+18*REF(X_1,2)+17*REF(X_1,3)+16*REF(X_1,4)+15*REF(X_1,5)+14*REF(X_1,6)+13*REF(X_1,7)+12*REF(X_1,8)+11*REF(X_1,9)+10*REF(X_1,10)+9*REF(X_1,11)+8*REF(X_1,12)+7*REF(X_1,13)+6*REF(X_1,14)+5*REF(X_1,15)+4*REF(X_1,16)+3*REF(X_1,17)+2*REF(X_1,18)+REF(X_1,20))/210;{计算X_1的加权移动平均}

X_9:=MA(X_8,20);{计算X_8的20日简单移动平均}

X_10:=MA(X_9,2);{计算X_9的2日简单移动平均}

DRAWBAND(X_9,RGB(250,0,0),X_10,RGB(250,250,0));

NOTEXTDTTJ:CONST(CLOSE),DOTLINE,COLORGRAY;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),COLOR7D7DFF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0),COLOR7D7DFF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3.1,0),COLOR1313FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.4,0),COLOR2424FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0),COLOR2D2DFF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.6,0),COLOR4444FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0),COLOR5757FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.6,0),COLOR6666FF;

STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.1,0),COLOR7D7DFF;

STICKLINE(CLOSE< OPEN,HIGH,LOW,0,0),COLORAA9900;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,0,0),COLORAA5500;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,3.1,0),COLORAA6600;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,2.4,0),COLORAA7700;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,2,0),COLORAA8800;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,1.6,0),COLORAA9900;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,1.2,0),COLORAAAA00;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,0.6,0),COLORAACC00;

STICKLINE(CLOSE< OPEN,CLOSE,OPEN,0.1,0),COLORAADD00;

指标“通达信乾坤趋势主图指标”未发现未来函数,请方向学习使用(内容仅供学习参考,不构成任何买卖依据)


文章版权及转载声明

作者:指标公式网本文地址:http://www.gukoudai.com/p113.html发布于 2024-10-10
文章转载或复制请以超链接形式并注明出处股口袋

分享