均线粘合的指标公式汇集
 一、    均线粘合很少有百分百相等的情况,可以取1%振幅内粘合,并且一般是3条均线。源码如下:

X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;
 X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;
 X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;
 MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3;

 

二、    所谓的均线粘合就是5、10、20、30、60、90、120、250日中有两条或三条、四条、五条、六条移动平均成本接近相同,或相差不大。例如三线粘合,我们只需要比较出这三条线中的最大成本和最小成本,把最大成本值和最小成本值之间的差距定义为某一个窄幅波动范围就可以了。

MA1:=MA(CLOSE,5);
 MA2:=MA(CLOSE,10);
 MA3:=MA(CLOSE,20);
 MA4:=MA(CLOSE,60);
 MA5:=MA(CLOSE,120);
 MA6:=MA(CLOSE,250);
 A:MAX(MAX(MA1,MA2),MA3),LINETHICK0;
 B:MIN(MIN(MA1,MA2),MA3),LINETHICK0;
三线粘合:IF(RANGE(100*(A-B)/B,0,5),100*(A-B)/B,DRAWNULL),LINETHICK0;
 SA:MAX(MAX(MA1,MA2),MAX(MA3,MA4)),LINETHICK0;
 SB:MIN(MIN(MA1,MA2),MIN(MA3,MA4)),LINETHICK0;
四线粘合:IF(RANGE(100*(SA-SB)/SB,0,10),100*(SA-SB)/SB,DRAWNULL),LINETHICK0;
 WA:MAX((MAX(MA1,MA2),MAX(MA3,MA4)),MA5),LINETHICK0;
 WB:MIN((MIN(MA1,MA2),MIN(MA3,MA4)),MA5),LINETHICK0;
五线粘合:IF(RANGE(100*(WA-WB)/WB,0,15),100*(WA-WB)/WB,DRAWNULL),LINETHICK0;
 LA:MAX((MAX(MA1,MA2),MAX(MA3,MA4)),MAX(MA5,MA6)),LINETHICK0;
 LB:MIN((MIN(MA1,MA2),MIN(MA3,MA4)),MIN(MA5,MA6)),LINETHICK0;
六线粘合:IF(RANGE(100*(LA-LB)/LB,0,20),100*(LA-LB)/LB,DRAWNULL),LINETHICK0;

三、均线粘合:

tj1:=max(max(max(ma(c,5),ma(c,10)),ma(c,20)),ma(c,30));
 tj2:=min(min(min(ma(c,5),ma(c,10)),ma(c,20)),ma(c,30));
 tj1/tj2<1.01;

四、均线多头排列、均线粘合,且股价刚刚过年线

m:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20)+MA(CLOSE,30))/4;
 MA(CLOSE,5)>MA(CLOSE,10)&&
 MA(CLOSE,10)>MA(CLOSE,20)&&
 MA(CLOSE,20)>MA(CLOSE,30)&&
 ABS(MA(CLOSE,5)-MA(CLOSE,30))/m<0.05&&
 ABS(CLOSE-m)/m<0.05&&
 CLOSE>MA(CLOSE,5)&&
 CLOSE>MA(CLOSE,250)&&
 ABS(CLOSE-MA(CLOSE,250))/MA(CLOSE,250)<0.05;

五、修改的均线粘合公式

 (主图叠加指标)
EMA5:=MA(C,M1);
 EMA10:=MA(C,M2);
 EMA20:=MA(C,M3);
 EMA60:=MA(C,M4);
 EMA90:=MA(C,M5);
 EMA120:=MA(C,M6);
 EMA240:=MA(C,M7);

短线均线粘合:=MAX(EMA5,EMA10)/MIN(EMA5,EMA10)*100
 MAX(EMA5,EMA20)/MIN(EMA5,EMA20)*100
 MAX(EMA5,EMA60)/MIN(EMA5,EMA60)*100
 MAX(EMA10,EMA20)/MIN(EMA10,EMA20)*100
 MAX(EMA10,EMA60)/MIN(EMA60,EMA60)*100
 MAX(EMA20,EMA60)/MIN(EMA20,EMA60)*100
 DRAWTEXT(短线均线粘合,c*1.1,’短线均线粘合’);

中线均线粘合:=MAX(EMA20,EMA60)/MIN(EMA20,EMA60)*100
 MAX(EMA20,EMA90)/MIN(EMA20,EMA90)*100
 MAX(EMA20,EMA120)/MIN(EMA20,EMA120)*100
 MAX(EMA60,EMA90)/MIN(EMA60,EMA90)*100
 MAX(EMA60,EMA120)/MIN(EMA60,EMA120)*100
 MAX(EMA90,EMA120)/MIN(EMA90,EMA120)*100
 DRAWTEXT(中线均线粘合,c*1.1,’中线均线粘合’);
中长线均线粘合:=MAX(EMA60,EMA90)/MIN(EMA60,EMA90)*100
 MAX(EMA60,EMA120)/MIN(EMA60,EMA120)*100
 MAX(EMA60,EMA240)/MIN(EMA60,EMA240)*100
 MAX(EMA90,EMA120)/MIN(EMA90,EMA120)*100
 MAX(EMA90,EMA240)/MIN(EMA90,EMA240)*100
 MAX(EMA120,EMA240)/MIN(EMA120,EMA240)*100
 DRAWTEXT(中长线均线粘合,c*1.1,’中长线均线粘合’);

 

六、5,10,20日三线粘合

X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;{取1%振幅内粘合}
X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;
 X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;
 AA:=MA(C,5)>REF(MA(C,5),1);BB:=MA(C,10)>REF(MA(C,10),1);CC:=MA(C,5)>MA(C,10);{均线勾头向上}
CDJZ:=ABS(MA(C,20)-MA(C,120))/MA(C,120)<0.4;{长短均线距离绝对值越小越好}
MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3
 AND CDJZ AND AA AND BB AND CC;

 5,10,30日三线粘合

X1:=ABS(MA(C,10)/MA(C,30)-1)<0.01;{取1%振幅内粘合}
X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;
 X3:=ABS(MA(C,5)/MA(C,30)-1)<0.01;
 AA:=MA(C,5)>REF(MA(C,5),1);BB:=MA(C,10)>REF(MA(C,10),1);CC:=MA(C,5)>MA(C,10);{均线勾头向上}
CDJZ:=ABS(MA(C,30)-MA(C,120))/MA(C,120)<0.4;{长短均线距离绝对值越小越好}
MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3
 AND CDJZ AND AA AND BB AND CC;

 5,10,20,30日四线粘合

X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;{取1%振幅内粘合}
X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;
 X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;
 X4:=ABS(MA(C,5)/MA(C,30)-1)<0.01;
 AA:=MA(C,5)>REF(MA(C,5),1);BB:=MA(C,10)>REF(MA(C,10),1);CC:=MA(C,5)>MA(C,10);{均线勾头向上}
CDJZ:=ABS(MA(C,20)-MA(C,120))/MA(C,120)<0.4;{长短均线距离绝对值越小越好}
MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3 AND X4
 AND CDJZ AND AA AND BB AND CC;

 5,10,20,60日四线粘合

X1:=ABS(MA(C,10)/MA(C,20)-1)<0.01;{取1%振幅内粘合}
X2:=ABS(MA(C,5)/MA(C,10)-1)<0.01;
 X3:=ABS(MA(C,5)/MA(C,20)-1)<0.01;
 X4:=ABS(MA(C,5)/MA(C,60)-1)<0.01;
 AA:=MA(C,5)>REF(MA(C,5),1);BB:=MA(C,10)>REF(MA(C,10),1);CC:=MA(C,5)>MA(C,10);{均线勾头向上}
MA(C,5)>REF(MA(C,5),1) AND X1 AND X2 AND X3 AND X4
 AND AA AND BB AND CC;

 30,60,120日三线多排

A1:=MA(CLOSE,N);
 A2:=MA(CLOSE,N1);
 A3:=MA(CLOSE,N2);
 CLOSE>A1 AND A1>A2 AND A2>A3 AND CLOSE>OPEN;

document.body.oncopy = function ()
{{ setTimeout( function () { var text = clipboardData.getData(“text”);
if (text) { text = text + “{公式网分享:”+location.href+”}”; clipboardData.setData(“text”, text); } }, 100 ) }}

$(“loadlist”).style.display=”none”;

上一篇:起飞前的买点公式 详细说明    下一篇:筹码分布幅图指标 用了好多年了

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。