通达信金宝主图 指标源码
XA_1:=CLOSE*VOL;
XA_2:=EMA((EMA(XA_1,3)/EMA(VOL,3)+EMA(XA_1,6)/EMA(VOL,6)+EMA(XA_1,12)/EMA(VOL,12)+EMA(XA_1,24)/EMA(VOL,24))/4,13);
XA_3:=1.08*XA_2;
XA_4:=EMA(XA_3-(EMA(CLOSE,3)-XA_3),5);
A7:IF(XA_4<=XA_3,XA_4,XA_3),COLORYELLOW,LINETHICK2;
XA_5:=2*XA_3-A7;
A9:IF(XA_5>=XA_3,XA_5,XA_3),COLORYELLOW,LINETHICK2;
观望:IF(A7=A9,A7,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
XA_6:=REF(CLOSE,1)*1.1-CLOSE<0.01 AND HIGH=CLOSE;
XA_7:=XA_3>=REF(XA_3,1) AND A7<REF(A7,1) AND CLOSE>XA_3 AND OPEN>XA_3;
STICKLINE(XA_7,OPEN,(OPEN+CLOSE)/2,3,0),COLORYELLOW;
STICKLINE(XA_7,CLOSE,(OPEN+CLOSE)/2,3,0),COLORRED;
XA_8:=CROSS(CLOSE,XA_3) AND XA_6;
DRAWTEXT(XA_8,LOW,'攻击'),COLORYELLOW;
XA_9:=CROSS(CLOSE,A7);
DRAWTEXT(XA_9,LOW,'起'),COLORYELLOW;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
XA_1赋值:收盘价*成交量
XA_2赋值:EMA((EMA(XA_1,3)/EMA(成交量,3)+EMA(XA_1,6)/EMA(成交量,6)+EMA(XA_1,12)/EMA(成交量,12)+EMA(XA_1,24)/EMA(成交量,24))/4,13)
XA_3赋值:1.08*XA_2
XA_4赋值:EMA(XA_3-(EMA(收盘价,3)-XA_3),5)
如果XA_4<=XA_3返回XA_4否则返回XA_3
XA_5赋值:2*XA_3-A7
如果XA_5>=XA_3返回XA_5否则返回XA_3
如果A7=A9返回A7否则返回DRAWNULL
DRAWKLINE(最高价,开盘价,最低价,收盘价)
XA_6赋值:1日前的收盘价*1.1-收盘价<0.01 AND 最高价=收盘价
XA_7赋值:XA_3>=1日前的XA_3 AND A7<1日前的A7 AND 收盘价>XA_3 AND 开盘价>XA_3
STICKLINE(XA_7,开盘价,(开盘价+收盘价)/2,3,0),画黄色
STICKLINE(XA_7,收盘价,(开盘价+收盘价)/2,3,0),画红色
XA_8赋值:收盘价上穿XA_3 AND XA_6
当满足条件XA_8时,在最低价和'攻击'位置书写文字
XA_9赋值:收盘价上穿A7
当满足条件XA_9时,在最低价和'起'位置书写文字