多头止损止盈:
if holding>0 and c>enterprice+30*mindiff then sell(1,0,market);
if holding>0 and c<enterprice-15*mindiff then sell(1,0,market);
空头止损止盈:
if holding<0 and c<enterprice-30*mindiff then sellshort(1,0,market);
if holding<0 and c>enterprice+15*mindiff then sellshort(1,0,market);