指标公式
软件: 通达信 
公式类型: 副图 
二级分类: MACD指标 无未来函数 操盘控盘 
炒股叉_20190710_102753.png

炒股叉_20190710_102800.png

[lywrap=通达信副图指标公式][lycode=tdx,true]SHORT:=12;
LONG:=26;
MID:=9;

DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORMAGENTA,LINETHICK2;
MACD:(DIF-DEA)*2,COLORSTICK;
STICKLINE(MACD>0,MACD,0,0.01,0),COLORRED,,LINETHICK2;
STICKLINE(MACD<0,MACD,0,0.01,0),COLORCYAN;
STICKLINE(MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND MACD<0,MACD,0,0.01,0),COLORYELLOW;
STICKLINE(MACD<REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND MACD>0,MACD,0,0.01,0),COLORGREEN;
STICKLINE(MACD>REF(MACD,1) AND REF(MACD,1)>REF(MACD,2) AND MACD<0,MACD,0,0.01,0),COLORGREEN;
STICKLINE(MACD<REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND MACD>0,MACD,0,0.01,0),COLORYELLOW;[/lycode][lycode=tdx2,true]SHORT赋值:12
LONG赋值:26
MID赋值:9
输出DIF:收盘价的SHORT日指数移动平均-收盘价的LONG日指数移动平均
输出DEA:DIF的MID日指数移动平均
如果DIF>1日前的DIF,返回DIF,否则返回无效数,画红色,线宽为2
如果DEA>1日前的DEA,返回DEA,否则返回无效数,画洋红色,线宽为2
输出平滑异同平均:(DIF-DEA)*2,COLORSTICK
当满足条件MACD>0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画红色,,线宽为2
当满足条件MACD<0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画青色
当满足条件MACD>1日前的MACDANDREF(MACD,1)<2日前的MACDANDMACD<0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画黄色
当满足条件MACD<1日前的MACDANDREF(MACD,1)>2日前的MACDANDMACD>0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画绿色
当满足条件MACD>1日前的MACDANDREF(MACD,1)>2日前的MACDANDMACD<0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画绿色
当满足条件MACD<1日前的MACDANDREF(MACD,1)<2日前的MACDANDMACD>0时,在MACD和0位置之间画柱状线,宽度为0.01,0不为0则画空心柱.,画黄色
[/lycode][/lywrap]

下载地址:https://pan.baidu.com/s/1RMAKEH6hEIMfPxi-ikcYBw

看了该指标的人还看了:
叶公跟庄指标    股海神偷指标    降龙贰式指标
均线进多头指标    主力主升指标    画线指标指标

使用道具 举报

回复