通达信最准确启动点
M1:=9;M2:=150;N:=12;
DIF:EMA(CLOSE,M1)-EMA(CLOSE,M2),NODRAW;
DEA:EMA(DIF,N),NODRAW;
MACD:2*(DIF-DEA),COLORSTICK;
DIK:4*DIF-3*DEA,COLORYELLOW;
X_1:=EMA(DIK,1);
{股票指标网}
IF(CLOSE>X_1,X_1,DRAWNULL),COLORRED,LINETHICK3;
IF(X_1<=REF(X_1,1),X_1,DRAWNULL),COLORGREEN,LINETHICK3;
X_2:=MACD<0 AND MACD>REF(MACD,1) AND REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
分界线:0,COLORMAGENTA;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR40FF00;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR40FF00;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR40FF00;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.6,0),COLOR0000DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.8,0),COLOR40FF00;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.1,0),COLOR40FF00;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.6,0),COLOR40FF00;
STICKLINE(X_2,DIK,0,2,0),COLORMAGENTA;
STICKLINE(X_2,0,ABS(MACD),2,0),COLORMAGENTA;
DRAWICON(X_2,ABS(MACD)*1.05,11);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
M1赋值:9
M2赋值:150
N赋值:12
输出DIF:收盘价的M1日指数移动平均-收盘价的M2日指数移动平均,NODRAW
输出DEA:DIF的N日指数移动平均,NODRAW
输出MACD:2*(DIF-DEA),COLORSTICK
输出DIK:4*DIF-3*DEA,画黄色
X_1赋值:DIK的1日指数移动平均
如果收盘价>X_1返回X_1否则返回DRAWNULL
IF(X_1<=1日前的X_1,X_1,DRAWNULL),COLORGREEN,LINETHICK3
X_2赋值:MACD<0 AND MACD>1日前的MACD AND 1日前的MACD<2日前的MACD AND 2日前的MACD<3日前的MACD AND 3日前的MACD<4日前的MACD
输出分界线:0,COLORMAGENTA
STICKLINE(MACD>1日前的MACD AND MACD>0,0,MACD,1.8,0),COLOR000055
STICKLINE(MACD>1日前的MACD AND MACD>0,0,MACD,1.1,0),COLOR000099
STICKLINE(MACD>1日前的MACD AND MACD>0,0,MACD,0.6,0),COLOR0000DD
STICKLINE(MACD<=1日前的MACD AND MACD>0,0,MACD,1.8,0),COLOR40FF00
STICKLINE(MACD<=1日前的MACD AND MACD>0,0,MACD,1.1,0),COLOR40FF00
STICKLINE(MACD<=1日前的MACD AND MACD>0,0,MACD,0.6,0),COLOR40FF00
STICKLINE(MACD>1日前的MACD AND MACD<0,0,MACD,1.8,0),COLOR000055
STICKLINE(MACD>1日前的MACD AND MACD<0,0,MACD,1.1,0),COLOR000099
STICKLINE(MACD>1日前的MACD AND MACD<0,0,MACD,0.6,0),COLOR0000DD
STICKLINE(MACD<=1日前的MACD AND MACD<0,0,MACD,1.8,0),COLOR40FF00
STICKLINE(MACD<=1日前的MACD AND MACD<0,0,MACD,1.1,0),COLOR40FF00
STICKLINE(MACD<=1日前的MACD AND MACD<0,0,MACD,0.6,0),COLOR40FF00
当满足条件X_2时,在DIK和0之间画柱状线
STICKLINE(X_2,0,MACD的绝对值,2,0),COLORMAGENTA
DRAWICON(X_2,MACD的绝对值*1.05,11)