N2:=5;
PF1 :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
PF2 :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
PF3 :=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
PF4:=(PF1+PF2+PF3)/3;
PF5:=EMA(PF4,5);
抄底:IF(PF4<=-20,10,0),LINETHICK2;
PF6:=HHV(抄底,10);
IF(抄底=10 ,20 ,10);
兜底:IF(PF6 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),40,0),LINETHICK2, STICK ,COLORRED;
VAR1:=99999;
VAR2:=IF(YEAR>=2010 AND MONTH>=8 AND DAY>=15,0,1);
买:IF((REF(CLOSE,13)-CLOSE)/REF(CLOSE,13)*100*VAR2>15 AND SUM(VOL/CAPITAL,13)*100< 18 AND VOL/CAPITAL*100< 2.5 AND (REF(CLOSE,1)-CLOSE)/REF(CLOSE,1)*100< 8,8,0);