2、写第一个,后面的照着写
variable:win=0; if 开仓条件 and holding=0 then begin buy; win:=c-enterprice; end
if c-enterprice>win then win:=c-enterprice;
if win>=10*mindiff and c-enterprice<=3*mindiff then sell; 这个移动止盈不起作用 |
d1: valuewhen(平空条件 and holding<0,date);
o1:valuewhen(平空条件 and holding<0,openprofit);
if date=d1 and 开空条件 and o1>=0 then buyshort;