感谢千钧老师..经常得到老师的帮助.发一个改编的飞狐均线角度公式...高手见笑了.....
DRAWTEXTEX(CLOSE,1,20,200,'■所属板块:'+BLKNAME),COLORMAGENTA;
P:=SYSPARAM(1);
ma5:=MA(CLOSE,5);
Q6:=ATAN((ma5/REF(ma5,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,20,10,'5日均线角度='+NUMTOSTR(Q6[P],2)+' 度'),COLORRED;
ma10:=MA(CLOSE,10);
Q2:=ATAN((ma10/REF(ma10,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,180,10,'10日均线角度='+NUMTOSTR(Q2[P],2)+' 度'),COLORWHITE;
ma20:=MA(CLOSE,20);
Q1:=ATAN((ma20/REF(ma20,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,20,60,'20日均线角度='+NUMTOSTR(Q1[P],2)+' 度'),COLORYELLOW;
ma30:=MA(CLOSE,30);
Q:=ATAN((ma30/REF(ma30,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,180,60,'30日均线角度='+NUMTOSTR(Q[P],2)+' 度'),COLORMAGENTA;
ma60:=MA(CLOSE,60);
Q3:=ATAN((ma60/REF(ma60,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,20,120,'60日均线角度='+NUMTOSTR(Q3[P],2)+' 度'),COLORGREEN;
ma120:=MA(CLOSE,120);
Q4:=ATAN((ma120/REF(ma120,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,180,120,'120日均线角度='+NUMTOSTR(Q4[p],2)+' 度'),COLORaaaaaa;
ma250:=MA(CLOSE,250);
Q5:=ATAN((ma250/REF(ma250,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,20,160,'250日均线角度='+NUMTOSTR(Q5[P],2)+' 度'),COLORCYAN;
ma360:=MA(CLOSE,360);
Q7:=ATAN((ma360/REF(ma360,1)-1)*100)*180/3.1416;
DRAWTEXTEX(CLOSE,1,180,160,'360日均线角度='+NUMTOSTR(Q7[P],2)+' 度'),COLORMAGENTA;
MA5:MA(C,5),COLORRED;
MA10:MA(C,10);
MA20:MA(C,20);
MA30:MA(C,30);
MA60:MA(C,60),LINETHICK2;
MA120:MA(C,120),LINETHICK2;
MA250:MA(C,250),LINETHICK2;
MA360:MA(C,360),LINETHICK2;