KD底动量线红柱和绿柱相对底部区域出现底买入
MTM:=C-REF(C,1);N1:=9;N2:=5;M:=10;K:100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),COLORWHITE;D:MA(K,N2),COLORYELLOW;快顶:= 20,COLORGRAY;快底:= 80 ,COLORLIRED;VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);主力进场:IF(VAR5>REF(VAR5,1),VAR5,0),COLORRED,NODRAW;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,3,0 ),COLOR000055,LINETHICK3;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.6,0 ),COLOR000077,LINETHICK3;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,2.1,0 ),COLOR000099,LINETHICK3;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,1.5,0 ),COLOR0000BB,LINETHICK3;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.9,0 ),COLOR0000DD,LINETHICK3;STICKLINE(VAR5>REF(VAR5,1),0,VAR5,0.3,0 ),COLOR0000FF,LINETHICK3;洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,3,0),COLOR005500,LINETHICK3;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.6,0),COLOR007700,LINETHICK3;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,2.1,0),COLOR009900,LINETHICK3;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLOR00BB00,LINETHICK3;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.9,0),COLOR00DD00,LINETHICK3;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,0.3,0),COLOR00FF00,LINETHICK3;主力:=0,COLORGRAY;顶:=68;短:=20;横:=40;DRAWTEXT(CROSS(K,顶),K,'↙保利'),COLORGREEN;DRAWTEXT(CROSS(K,短),K,'↙调'),COLORCYAN;DRAWTEXT(CROSS(横,D),K,'↙横'),COLORWHITE;K1:=EMA(C,5);K2:=EMA(C,10);K3:=EMA(C,30);K4:=2*(K1-K3);K5:=2*(K1-K2);成本:=2*(K5+K4) ,COLORRED;底部:CROSS(K,D) AND K<-0.1,COLORGRAY;突破:CROSS(成本,主力) AND K>成本,COLORGRAY;DRAWTEXT(突破,-8,'↖突') ,COLORRED;STICKLINE( 突破,0,12,6,0) ,COLORRED;STICKLINE(底部,8,0,6,0),COLORYELLOW;次金叉:=CROSS(K,D) AND K<-0.1;DRAWTEXT(次金叉,K,'↖次叉') ,COLORWHITE;JCCOUNT:=COUNT(CROSS(K,D),BARSLAST(D>=0));放量金叉:=CROSS(K,D) AND D<0 AND COUNT(JCCOUNT=2,21)=1;DRAWTEXT(放量金叉,0,'↖金叉') ,COLORYELLOW;DRAWICON(放量金叉,D*0.30,1) ;A1:=BARSLAST(REF(CROSS(K,D),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND K>REF(K,A1+1) AND CROSS(K,D);底背:DRAWLINE(A1=0,D,底背离,D,0),COLORGRAY,LINETHICK1;STICKLINE(底背离,0,10,5,0),COLORMAGENTA,LINETHICK2;DRAWTEXT(底背离 ,-28, '↖底 ') ,COLORYELLOW;A2:=BARSLAST(REF(CROSS(D,K),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(K,A2+1)>K AND CROSS(D,K);顶背:DRAWLINE(A2=0,D,顶背离,D,0),COLORGRAY,LINETHICK1;DRAWTEXT(顶背离,58,'↙顶'),COLORMAGENTA;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
MTM赋值:C-1日前的C
N1赋值:9
N2赋值:5
M赋值:10
输出K:100*MTM的N1日指数移动平均,N1)/EMA(EMA(MTM的绝对值,N1),N1),画白色
输出D:K的N2日简单移动平均,画黄色
快顶赋值: 20,COLORGRAY
快底赋值: 80 ,COLORLIRED
VAR1赋值:REF((最低价+开盘价+收盘价+最高价)/4,1)
VAR2赋值:SMA(最低价-VAR1的绝对值,13,1)/SMA(最低价-VAR1和0较大值,10,1)
VAR3赋值:VAR2的10日指数移动平均
VAR4赋值:33日内最低价最低值
如果最低价<=VAR4返回VAR3否则返回0
输出主力进场:IF(VAR5>1日前的VAR5,VAR5,0),COLORRED,NODRAW
STICKLINE(VAR5>1日前的VAR5,0,VAR5,3,0 ),COLOR000055,LINETHICK3
STICKLINE(VAR5>1日前的VAR5,0,VAR5,2.6,0 ),COLOR000077,LINETHICK3
STICKLINE(VAR5>1日前的VAR5,0,VAR5,2.1,0 ),COLOR000099,LINETHICK3
STICKLINE(VAR5>1日前的VAR5,0,VAR5,1.5,0 ),COLOR0000BB,LINETHICK3
STICKLINE(VAR5>1日前的VAR5,0,VAR5,0.9,0 ),COLOR0000DD,LINETHICK3
STICKLINE(VAR5>1日前的VAR5,0,VAR5,0.3,0 ),COLOR0000FF,LINETHICK3
输出洗盘:IF(VAR5<1日前的VAR5,VAR5,0),画绿色,NODRAW
STICKLINE(VAR5<1日前的VAR5,0,VAR5,3,0),COLOR005500,LINETHICK3
STICKLINE(VAR5<1日前的VAR5,0,VAR5,2.6,0),COLOR007700,LINETHICK3
STICKLINE(VAR5<1日前的VAR5,0,VAR5,2.1,0),COLOR009900,LINETHICK3
STICKLINE(VAR5<1日前的VAR5,0,VAR5,1.5,0),COLOR00BB00,LINETHICK3
STICKLINE(VAR5<1日前的VAR5,0,VAR5,0.9,0),COLOR00DD00,LINETHICK3
STICKLINE(VAR5<1日前的VAR5,0,VAR5,0.3,0),COLOR00FF00,LINETHICK3
主力赋值:0,COLORGRAY
顶赋值:68
短赋值:20
横赋值:40
DRAWTEXT(K上穿顶,K,'↙保利'),画绿色
DRAWTEXT(K上穿短,K,'↙调'),画青色
DRAWTEXT(横上穿D,K,'↙横'),画白色
K1:=C的5日指数移动平均
K2:=C的10日指数移动平均
K3:=C的30日指数移动平均
K4:=2*(K1-K3)
K5:=2*(K1-K2)
成本赋值:2*(K5+K4) ,COLORRED
输出底部:K上穿D AND K<-0.1,COLORGRAY
输出突破:成本上穿主力 AND K>成本,COLORGRAY
当满足条件突破时,在-8和'↖突'位置书写文字
当满足条件 突破时,在0和12之间画柱状线
当满足条件底部时,在8和0之间画柱状线
次金叉赋值:K上穿D AND K<-0.1
当满足条件次金叉时,在K和'↖次叉'位置书写文字
JCCOUNT赋值:COUNT(K上穿D,上次D>=0距今天数)
放量金叉赋值:K上穿D AND D<0 AND 统计21日满足JC=2的天数=1
当满足条件放量金叉时,在0和'↖金叉'位置书写文字
当满足条件放量金叉时,在D*0.30和1之间画图标
A1赋值:上次1日前的K上穿D距今天数
底背离赋值:A1+1日前的收盘价>收盘价 AND K>A1+1日前的K AND K上穿D
输出底背:DRAWLINE(A1=0,D,底背离,D,0),COLORGRAY,LINETHICK1
当满足条件底背离时,在0和10之间画柱状线
当满足条件底背离 时,在-28和 '↖底 '位置书写文字
A2赋值:上次1日前的D上穿K距今天数
顶背离:=A2+1日前的收盘价<收盘价 AND A2+1日前的K>K AND D上穿K
顶背:DRAWLINE(A2=0,D,顶背离,D,0),COLORGRAY,LINETHICK1
当满足条件顶背离时,在58和'↙顶'位置书写文字