var1:=(CAPITAL-VOL);
var2:=EMA(EMA(EMA(CLOSE,2),2),2);
var3:=REF(HIGH,1)*1.1;
var4:=HIGH*1.1;
var5:=(var4*VOL+var3*var1)/CAPITAL;
var6:=REF(LOW,1)*0.9;
var7:=LOW*0.9;
var8:=(var7*VOL+var6*var1)/CAPITAL;
var9:=EMA(var8,30);
var10:=EMA(var5,30);
var11:=var10-2;
var18:=IF(CLOSE<=var9,var11,var10);
var16:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
STICKLINE(var18-var11=0 AND 1 AND CROSS((var2-REF(var2,1))/REF(var2,1)*100,MA((var2-REF(var2,1))/REF(var2,1)*100,3)),50,0,5,0),COLORCC9966;
赢:DRAWTEXT(FILTER(var18-var11=0 AND CROSS((var2-REF(var2,1))/REF(var2,1)*100,MA((var2-REF(var2,1))/REF(var2,1)*100,3)),4),55,'买入'),COLORBLUE;
卖出线:SMA(SMA(var16,3,1),3,1),COLORYELLOW;
买入线:3*SMA(var16,3,1)-2*卖出线,COLORRED;
DRAWICON(CROSS(90,买入线),90,2);
STICKLINE(CROSS(90,买入线),15,0,5,0),COLORGREEN;
STICKLINE(SMA(var16,3,1)>卖出线,SMA(var16,3,1),卖出线,4,0),COLOR1133FF;
长买:FILTER(var18-var11=0 AND CROSS((var2-REF(var2,1))/REF(var2,1)*100,MA((var2-REF(var2,1))/REF(var2,1)*100,3)),4);
短买:CROSS(买入线,卖出线),COLORGREEN;
DRAWTEXT(短买,卖出线,'★'),COLORRED;