网友求助:

源码:
input:N1(15,1,1000),N2(2,1,100),度(90,1,360);

PARTLINE(C>0,度),COLORRED,POINTDOT;
PARTLINE(C>0,-度),COLOR005500,POINTDOT;
PARTLINE(C>0,45),COLORMAGENTA,POINTDOT;
PARTLINE(C>0,-45),COLORCYAN,POINTDOT;
PARTLINE(C>0,10),COLORYELLOW;
PARTLINE(C>0,0),COLORWHITE,POINTDOT;
a1:=IF(CLOSE<100,CLOSE*100,CLOSE);
a2:=MA(CLOSE,n1);
a3:=IF(CLOSE<a1,a2*100,a2);
a4:=SQRT(a1);
a5:=SQRT(a3);
a6:=a4-a5;
a7:=a6*360/12;
趋势:MA(a7,n2),COLORRED,LINETHICK2;
MA1:=ma(close,5);
MA2:=ma(close,10);
MA3:=ma(close,20);
MA4:=ma(close,40);
xL:=min(Min( Ma1,Ma2 ), Min( Ma3,Ma4 ));
dL:=max(Max( Ma1,Ma2 ), Max( Ma3,Ma4 ));
粘合度:100*(dL-xL)/xL,COLORWHITE,LINETHICK2;


请 老师 帮忙 做出 趋势线 上穿 粘合度 线 选股公式

 

 

解答如下:

N1:=15;N2:=2;
A1:=IF(CLOSE<100,CLOSE*100,CLOSE);
A2:=MA(CLOSE,N1);
A3:=IF(CLOSE<A1,A2*100,A2);
A4:=SQRT(A1);
A5:=SQRT(A3);
A6:=A4-A5;
A7:=A6*360/12;
趋势:=MA(A7,N2),COLORRED,LINETHICK2;
MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
MA3:=MA(CLOSE,20);
MA4:=MA(CLOSE,40);
XL:=MIN(MIN( MA1,MA2 ), MIN( MA3,MA4 ));
DL:=MAX(MAX( MA1,MA2 ), MAX( MA3,MA4 ));
粘合度:=100*(DL-XL)/XL;
XG:CROSS(趋势,粘合度);