网友求助:

1、 请老师注意:本公式已经有多位老师改完之后仍不能在通达信上使用,错误信息如下:当前公式 : 见底选股2 (指标画线公式)
错误句 :
================
趋势线:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100
详细信息 : 变量 趋势线 定义重复!
错误起始位置 : 156 ; 长度: 5

2、 当出现来临、砸锅买、见底、机会、信号时做为选股条件。烦请老师更改一下

VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.2,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,38);
VAR6:=HHV(VAR4,38);
VAR7:=IF(LLV(LOW,90),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
有庄: STICKLINE(VAR8,0,VAR8,6,1) , COLORFFAAFF;
趋势线: (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100 , COLORAABBDD;
AA:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-30,趋势线),1) AND CROSS(趋势线,-30)) OR 趋势线=-30;
DRAWTEXT(AA,500,'砸锅买'),COLORYELLOW;
砸锅买:IF(AA,500,-30),COLORYELLOW;
BB:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-20 AND 趋势线>-25) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-20,趋势线),1) AND CROSS(趋势线,-20));
DRAWTEXT(BB,300,'见底'),COLORRED;
见底:IF(BB,300,-20),COLORRED;
CC:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-25 AND 趋势线>-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-25,趋势线),1) AND CROSS(趋势线,-25));
DRAWTEXT(CC,400,'机会'),COLOR00FF00;
机会:IF(CC,400,-25),COLOR00FF00;

来临:IF(CROSS(-25,趋势线),150,-25),LINETHICK2,COLORF00FF0;
DRAWTEXT(CROSS(-25,趋势线),170,'★'),COLORF00FF0;

砸锅等:IF(CROSS(-30,趋势线),200,-30),LINETHICK2,COLORWHITE;
DRAWTEXT(CROSS(-30,趋势线),220,'★'),COLORWHITE;

 

 

解答如下:

趋势线:=(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100 ;
AA:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-30,趋势线),1) AND CROSS(趋势线,-30)) OR 趋势线=-30;
BB:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-20 AND 趋势线>-25) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-20,趋势线),1) AND CROSS(趋势线,-20));
CC:=((REF(趋势线,1)<REF(趋势线,2) AND 趋势线<-25 AND 趋势线>-30) AND 趋势线>=REF(趋势线,1)) OR (REF(CROSS(-25,趋势线),1) AND CROSS(趋势线,-25));
DD:=CROSS(-25,趋势线);
AA OR BB OR CC OR DD;