{醉了选股}
{参数1: N1, 最小: 2, 最大: 100, 缺省: 14, 日线: 13}
{参数2: M, 最小: 2, 最大: 100, 缺省: 84, 日线: 34}
VAR1:=(HIGH+LOW+CLOSE)/3;
VAR2:=(VAR1-MA(VAR1,N1))/(0.015*AVEDEV(VAR1,N1));
VAR3:=(VAR1-MA(VAR1,M))/(0.015*AVEDEV(VAR1,M));
VAR4:=200;
VAR5:=(-150);
VAR6:=REF(LOW,1);
VAR7:=SMA(ABS(LOW-VAR6),3,1)/SMA(MAX(LOW-VAR6,0),3,1)*100;
VAR8:=EMA(IF(CLOSE*1.3,VAR7*10,VAR7/10),3);
VAR9:=LLV(LOW,30);
VAR10:=HHV(VAR8,30);
VAR11:=IF(MA(CLOSE,58),1,0);
VAR12:=EMA(IF(LOW<=VAR9,(VAR8+VAR10*2)/2,0),3)/618*VAR11;
VAR13:=IF(VAR12>50,50,VAR12);
VAR14:=STICKLINE(VAR13>(-120),0,VAR13,6,1);
VAR15:=IF(VAR14,1,0);
VAR16:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR17:=IF(CROSS(VAR2,(-150)),(-150),(-200));
VAR18:=REF(CLOSE,1);
VAR19:=SMA(MAX(CLOSE-VAR18,0),6,1)/SMA(ABS(CLOSE-VAR18),6,1)*100;
VAR20:=IF(CROSS(80,VAR19),200,250);
VAR21:=IF(CROSS(VAR3,(-70)),(-100),(-150));
VAR22:=VAR17=(-150) AND VAR21=(-100);
===================以上是原公式,修改后,才出选股信号,源码如下:
{醉了选股}
{参数1: N1, 最小: 2, 最大: 100, 缺省: 14, 日线: 13}
{参数2: M, 最小: 2, 最大: 100, 缺省: 84, 日线: 34}
N1:=13;
M:=34;
VAR1:=(HIGH+LOW+CLOSE)/3;
VAR2:=(VAR1-MA(VAR1,N1))/(0.015*AVEDEV(VAR1,N1));
VAR3:=(VAR1-MA(VAR1,M))/(0.015*AVEDEV(VAR1,M));
VAR17:=CROSS(VAR2,-150);
VAR21:=CROSS(VAR3,-70);
XG:VAR17 AND VAR21;