N:=5;N1:=3;N2:=3;
M1: EMA(CLOSE,3);
M2: EMA(CLOSE,8);
M3: EMA(M2,13);
M4: EMA(M2,55);
Var1:=EMA(M3,55);
M5: EMA(M4,81);
M6: EMA(Var1,188), COLORRED;
M7: EMA(Var1,713), colorwhite,linethick2;
M8: EMA(Var1,1860), colorgreen,linethick2;
M9: EMA(Var1,2243), COLORRED,linethick2;
Var2:=(REF(HIGH,1)+REF(LOW,1))/2;
Var3:=MA(CLOSE,N)+2*STD(CLOSE,N);
DRAWICON(CROSS(Var2,Var3),HIGH*1.035,1);
DRAWTEXT(CROSS(Var2,Var3),HIGH*1.02,'卖出'),COLORBLUE;
Var4:=REF(CLOSE,1);
Var5:=SMA(MAX(CLOSE-Var4,0),N1,1)/SMA(ABS(CLOSE-Var4),N1,1)*100;
Var6:=CROSS(N2,Var5);
Var7:=FILTER(Var6,4);
DRAWICON(Var7,HIGH*1.035,1);
DRAWTEXT(Var7,HIGH*1.02,'卖出'),COLORBLUE;
A7:=(2*C+H+L)/4;
Var10:=LLV(LOW,34);
Var11:=HHV(HIGH,34);
SK:=EMA((A7-Var1)/(Var2-Var1)*100,7);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);
DRAWTEXT(IF(count(close<ref(close,1),8)/8>6/10 and vol>=1.5*ma(vol,5) and
count(sk>=sd,3) and ref(low,1)=LLV(Low,120),1,0),LOW,'●买进'),COLOR0099ff;
DRAWTEXT(IF(count(close<ref(close,1),13)/13>6/10 and
count(sk>sd,6) and ref(low,5)=LLV(Low,120) and ref(close>=open,4) and
ref(close>open,3) and REF(CLOSE>OPEN,2) AND ref(open>close,1) and
open>ref(close,1),1,0),LOW,'●买进'),COLOryellow;
D:=MA(CLOSE,80)-MA(CLOSE,10)/3;
DRAWTEXT(if(CLOSE<D and VOL/240>MA(VOL,5)/240 AND CLOSE>REF(CLOSE,1)*1.08
AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'●抄底'),coloryellow;