MA1:=MA(C,5); MA2:=MA(C,10); MA3:=MA(C,20); MA4:=MA(C,60); A:=MAX(MAX(MA1,MA2),MAX(MA3,MA4)); B:=MIN(MIN(MA1,MA2),MIN(MA3,MA4)); 粘合:RANGE(100*(A-B)/B,0,3); 13、均线粘合 MA1:=MA(C,5); MA2:=MA(C10); MA3:=MA(C,20); P1:=ABS(MA1-MA2)+ABS(MA2-MA3); P1/C<1/100 AND MA1>REF(MA1,1) AND MA2>REF(MA2,1); 14、均线粘合(另种表达式) MA1:=MA(C,5); MA2:=MA(C,10); MA3:=MA(C,30); A:=MAX(MAX(MA1,MA2),MA3); B:=MIN(MIN(MA1,MA2),MA3); COUNT(ABS(A-B)/B<0.01,3)=3;表示已粘合3天(含3天)以上 15、多条均线粘合 如5、10、20、30、120、250日移动平均线粘合 aa:=(ma(c,5)+ma(c,10)+ma(c,20)+ma(c,30)+ma(c,120)+ma(c,250))/6; up:=aa*n/100+aa; down:=aa-aa*n/100; count(BETWEEN(ma(c,5),up,down) and BETWEEN(ma(c,10),up,down) and BETWEEN(ma(c,20),up,down) and BETWEEN(ma(c,30),up,down)and BETWEEN(ma(c,120),up,down) and BETWEEN(ma(c,250),up,down),m)=m; n(2,1,500) m(10,1,100) 调整参数n为粘合程度,n值越小粘合的程度越高,即均线距离越近;m为粘合周期。 例;多线粘合公式 a13:=ma(c,13); a21:=ma(c,21); a34:=ma(c,34); a55:=ma(c,55); a120:=ma(c,120); a240:=ma(c,240); max(max(max(a13,a21),max(a34,a55)),max(a120,a240))/min(min(min(a13,a21),min(a34,a55)),min(a120,a240))<1.1 and a13>ref(a13,1)and a120>ref(a120,1);股票论坛 www.55188.com |
|