周线粘合公式如何编写? 分钟多均线粘合选股公式
同花顺均线粘合公式
均线在一个月以上长期粘合,最好能处于低位粘合并且粘合度较为紧密。在此小弟MA5:=MA(C,5); MA10:=MA(C,10); MA30:=MA(C,30); MA60:=MA(
均线粘合公式
原发布者:joseph大法官
均线粘合选+均线多头排列选股公式 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)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)REF(MA(C,5),1)ANDX1ANDX2ANDX3ANDCDJZANDAAANDBBANDCC;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)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)REF(MA(C,5),1)ANDX1ANDX2ANDX3ANDCDJZANDAAANDBBANDCC;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)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)REF(MA(C,5),1)ANDX1ANDX2ANDX3ANDX4ANDCDJZANDAAANDBBANDCC; 5,10,2
均线粘合的公式
ma20:=ma(c,20);
ma90:=ma(c,90);
ma60:=ma(c,60);
var1:=(ma20-ma90)/ma60;
var2:ABS(var1);
这是根据你的描述写的源码,粘合的程度多少,要根据var2的数值来确定,自己对照多只个股后找出数值的范围,再用个between语句来描述,也可以做选股公式.
求助通达信5.10.20周线粘合长期横盘选股公式
N:=1.5;
MA1:=MA(C,5);
MA2:=MA(C,10);
MA3:=MA(C,20);
HH:=MAX(MA1,MAX(MA2,MA3));
LL:=MIN(MA1,MIN(MA2,MA3));
均线粘合度:=(HH-LL)/LL*100;
XG:均线粘合度<N;
(将选股周期设为周线进行选股。N为均线粘合度范围,可修改)