趋势介入点通达信公式 副图 源码附图
F1:=(EMA(CLOSE,3) - EMA(CLOSE,7));
A1:=EMA(F1,3);
YY:=2*(F1-A1);
DIFK:=EMA(F1,3);
DIFD:=EMA(DIFK,3);
DKK:=4*F1-3*A1;
DDD:=EMA(DKK,5);
TRLSX1:=MAX(MAX((HHV(F1,13)-LLV(F1,13)),ABS(REF(F1,1)-HHV(F1,13))),ABS(REF(F1,1)-LLV(F1,13)));
TRLSX2:=EMA(TRLSX1,13);
TRLSX3:=REF(F1,1)-REF(TRLSX2,1);
支撑:=HHV(TRLSX3,13),COLORFFFFFF,NODRAW;
RSV14:=(CLOSE - LLV(LOW,5))/(HHV(HIGH,5) - LLV(LOW,5))-0.5;
K14:=EMA(RSV14,3),COLORFF00FF,NODRAW;
D14:=EMA(K14,3),COLORGREEN,NODRAW;
J14:=3*K14-2*D14;
DRAWBAND(F1,RGB(200,50,55),A1,RGB(50,100,10));
MACDXG2:=REF(COUNT(F1>0 AND YY< 0 AND YY< REF(YY,1),4)=4,1) AND YY>REF(YY,1);
STICKLINE(MACDXG2,YY*1.2,0,2.8,0),COLORRED;
STICKLINE(YY>REF(YY,1) AND YY>0,0,YY,1.8,0),COLOR000055;
STICKLINE(YY>REF(YY,1) AND YY>0,0,YY,1.1,0),COLOR000099;
STICKLINE(YY>REF(YY,1) AND YY>0,0,YY,0.6,0),COLOR0000BB;
STICKLINE(YY<=REF(YY,1) AND YY>0,0,YY,1.8,0),COLOR888888;
STICKLINE(YY<=REF(YY,1) AND YY>0,0,YY,1.1,0),COLORBBBBBB;
STICKLINE(YY<=REF(YY,1) AND YY>0,0,YY,0.6,0),COLORDDDDDD;
STICKLINE(YY>REF(YY,1) AND YY< 0,0,YY,1.8,0),COLOR3377AA;
STICKLINE(YY>REF(YY,1) AND YY< 0,0,YY,1.1,0),COLOR3388BB;
STICKLINE(YY>REF(YY,1) AND YY< 0,0,YY,0.6,0),COLOR4499CC;
STICKLINE(YY<=REF(YY,1) AND YY< 0,0,YY,1.8,0),COLORFF3300;
STICKLINE(YY<=REF(YY,1) AND YY< 0,0,YY,1.1,0),COLORFF5500;
STICKLINE(YY<=REF(YY,1) AND YY< 0,0,YY,0.6,0),COLORFF7700;
STICKLINE(J14< -0.5,0,0.15,1.8,0),COLORFF00FF;
KDJXG:=REF(COUNT(J14< REF(J14,1),5)>=3,1) AND REF(J14,1)< -0.4 AND J14>REF(J14,1);
DRAWICON(FILTER(KDJXG,3),YY*2.08,11);
准备介入点:=REF(CROSS(0,YY),3) AND COUNT(F1>0 AND YY< REF(YY,1),4)=4 ;
DRAWICON(准备介入点,0.25,9);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
F1赋值:(收盘价的3日指数移动平均 - 收盘价的7日指数移动平均)
A1赋值:F1的3日指数移动平均
YY赋值:2*(F1-A1)
DIFK赋值:F1的3日指数移动平均
DIFD赋值:DIFK的3日指数移动平均
DKK赋值:4*F1-3*A1
DDD赋值:DKK的5日指数移动平均
TRLSX1赋值:MAX(MAX((13日内F1最高值-13日内F1最低值),1日前的F1-13日内F1最高值的绝对值),ABS(1日前的F1-13日内F1最低值))
TRLSX2赋值:TRLSX1的13日指数移动平均
TRLSX3赋值:1日前的F1-1日前的TRLSX2
支撑赋值:13日内TRLSX3最高值,COLORFFFFFF,NODRAW
RSV14赋值:(收盘价 - 5日内最低价最低值)/(5日内最高价最高值 - 5日内最低价最低值)-0.5
K14赋值:RSV14的3日指数移动平均,COLORFF00FF,NODRAW
D14赋值:K14的3日指数移动平均,画绿色,NODRAW
J14赋值:3*K14-2*D14
DRAWBAND(F1,RGB(200,50,55),A1,RGB(50,100,10))
MACDXG2赋值:REF(COUNT(F1>0 AND YY< 0 AND YY< REF(YY,1),4)=4,1) AND YY>REF(YY,1)
当满足条件MACDXG2时,在YY*1.2和0之间画柱状线
STICKLINE(YY>1日前的YY AND YY>0,0,YY,1.8,0),COLOR000055
STICKLINE(YY>1日前的YY AND YY>0,0,YY,1.1,0),COLOR000099
STICKLINE(YY>1日前的YY AND YY>0,0,YY,0.6,0),COLOR0000BB
STICKLINE(YY<=1日前的YY AND YY>0,0,YY,1.8,0),COLOR888888
STICKLINE(YY<=1日前的YY AND YY>0,0,YY,1.1,0),COLORBBBBBB
STICKLINE(YY<=1日前的YY AND YY>0,0,YY,0.6,0),COLORDDDDDD
STICKLINE(YY>1日前的YY AND YY< 0,0,YY,1.8,0),COLOR3377AA
STICKLINE(YY>1日前的YY AND YY< 0,0,YY,1.1,0),COLOR3388BB
STICKLINE(YY>1日前的YY AND YY< 0,0,YY,0.6,0),COLOR4499CC
STICKLINE(YY<=1日前的YY AND YY< 0,0,YY,1.8,0),COLORFF3300
STICKLINE(YY<=1日前的YY AND YY< 0,0,YY,1.1,0),COLORFF5500
STICKLINE(YY<=1日前的YY AND YY< 0,0,YY,0.6,0),COLORFF7700
当满足条件J14< -0.5时,在0和0.15之间画柱状线
KDJXG赋值:REF(COUNT(J14< REF(J14,1),5)>=3,1) AND REF(J14,1)< -0.4 AND J14>REF(J14,1)
DRAWICON(KDJXG的3过滤,YY*2.08,11)
准备介入点赋值:3日前的0上穿YY AND COUNT(F1>0 AND YY< 1日前的YY,4)=4
当满足条件准备介入点时,在0.25和9之间画图标