比如说现在下了一手股指多单,我想设置3个点止损,5个点止盈,效果想和软件里设置的一样。
有代码可以实现吗?
图表:
if holding>0 and c-enterprice>5*mindiff then sell(1,0,market);//多头止盈
if holding>0 and enterprice-c>3*mindiff then sell(1,0,market);//多头止损
if holding<0 and enterprice-c>5*mindiff then sellshort(1,0,market);//空头止盈
if holding<0 and c-enterprice>3*mindiff then sellshort(1,0,market);//空头止损
好的。谢谢