您的位置:爱股网 > 查股公式 > 通达信K线颜色根据MACD指标变换源码[查股公式]
股票行情消息数据:

通达信K线颜色根据MACD指标变换源码[查股公式]

2022/7/4 10:02:42

通达信K线颜色根据MACD指标变换源码

K线颜色是根据MACD指标变换而来,其余的自己捉摸。。。。
源码:

{来源于: WWW.ttchagu.com}

MA1:EMA(CLOSE,P1);
MA2:EMA(CLOSE,P2);
MA3:EMA(CLOSE,P3);
MA4:EMA(CLOSE,P4);
DIFF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
MACD:=2*(DIFF1-DEA1),COLORYELLOW,LINETHICK0;
MACDHS:=IF(MACD>0 AND MACD>=REF(MACD,1),MACD,0);
MACDHX:=IF(MACD>0 AND MACD<REF(MACD,1),MACD,0);
MACDLX:=IF(MACD<0 AND MACD<=REF(MACD,1),MACD,0);
MACDLS:=IF(MACD<0 AND MACD>REF(MACD,1),MACD,0);

AA:=STICKLINE( C<0,H*1.003,L*0.998,0,0),COLOR666666;
BB:=STICKLINE( C<0,O,C,2.95,1),COLOR666666;

STICKLINE(MACDHS>0,O,C,3.0,0),COLOR0000BB;
STICKLINE(MACDHS>0,O,C,2.7,0),COLOR0000CC;
STICKLINE(MACDHS>0,O,C,2.4,0),COLOR0011CC;
STICKLINE(MACDHS>0,O,C,2.0,0),COLOR1122DD;
STICKLINE(MACDHS>0,O,C,1.7,0),COLOR2233DD;
STICKLINE(MACDHS>0,O,C,1.3,0),COLOR3344EE;
STICKLINE(MACDHS>0,O,C,1,0),COLOR4455EE;
STICKLINE(MACDHS>0,O,C,0.6,0),COLOR5566FF;
STICKLINE(MACDHS>0,O,C,0.3,0),COLOR6677FF;
STICKLINE(MACDHS>0,H,L,0,0),COLOR6677FF;
STICKLINE(MACDHX>0,O,C,3,0),COLOR0077BB;
STICKLINE(MACDHX>0,O,C,2.6,0),COLOR0088CC;
STICKLINE(MACDHX>0,O,C,2.2,0),COLOR0099CC;
STICKLINE(MACDHX>0,O,C,1.8,0),COLOR00AADD;
STICKLINE(MACDHX>0,O,C,1.4,0),COLOR00BBDD;
STICKLINE(MACDHX>0,O,C,1,0),COLOR00CCEE;
STICKLINE(MACDHX>0,O,C,0.6,0),COLOR00DDEE;
STICKLINE(MACDHX>0,O,C,0.2,0),COLOR00EEFF;
STICKLINE(MACDHX>0,O,C,0.1,0),COLOR00FFFF;
STICKLINE(MACDHX>0,H,L,0,0),COLOR00FFFF;
STICKLINE(MACDLS<0,O,C,3,0),COLOR770000;
STICKLINE(MACDLS<0,O,C,2.7,0),COLOR881100;
STICKLINE(MACDLS<0,O,C,2.4,0),COLOR992200;
STICKLINE(MACDLS<0,O,C,2.1,0),COLORAA3300;
STICKLINE(MACDLS<0,O,C,1.7,0),COLORBB4400;
STICKLINE(MACDLS<0,O,C,1.4,0),COLORCC5500;
STICKLINE(MACDLS<0,O,C,1.1,0),COLORDD6600;
STICKLINE(MACDLS<0,O,C,0.8,0),COLOREE7700;
STICKLINE(MACDLS<0,O,C,0.4,0),COLORFF8800;
STICKLINE(MACDLS<0,H,L,0,0),COLORFF8800;
STICKLINE(MACDLX<0,O,C,3.0,0),COLOR005500;
STICKLINE(MACDLX<0,O,C,2.8,0),COLOR007700;
STICKLINE(MACDLX<0,O,C,2.4,0),COLOR009900;
STICKLINE(MACDLX<0,O,C,2.0,0),COLOR00AA00;
STICKLINE(MACDLX<0,O,C,1.6.5,0),COLOR00BB00;
STICKLINE(MACDLX<0,O,C,1.2,0),COLOR00CC00;
STICKLINE(MACDLX<0,O,C,1.0,0),COLOR00DD00;
STICKLINE(MACDLX<0,O,C,0.6,0),COLOR00EE00;
STICKLINE(MACDLX<0,O,C,0.2,0),COLOR00FF00;
STICKLINE(MACDLX<0,H,L,0,0),COLOR00FF00;

相关文章列表
天天查股公式列表

股票公式分类

天天查股:股票行情消息 实时DDX在线 资金流向 千股千评 业绩报告 十大股东 最新消息 超赢数据 大小非解禁 停牌复牌 股票分红数据 股票评级报告
广告客服:315126368   843010021
爱股网免费查股,本站内容与数据仅供参考,不构成投资建议,据此操作,风险自担,股市有风险,投资需谨慎。 沪ICP备15043930号-29