holding>0 and enterprice-c>=x
holding<0 and c-enterprice>=x
老师:帮我写个完整的,弄不起来。
平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr);
平多: sell(close-enterprice>=X AND holding>0, 0,marketr );
开多止损:sellshort(enterprice-c>=X AND holding>0, 0,marketr);
开空止损: sell( c-enterprice>=X AND holding<0, 0,marketr );
平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr);
平多:sell(close-enterprice>=X AND holding>0, 0,marketr );
开空止损:sellshort(enterprice-c>=X AND holding<0, 0,marketr);
开多止损:sell( c-enterprice>=X AND holding>0, 0,marketr );
平空:sellshort(enterprice-close>=X AND holding<0, 0,marketr);
平多:sell(close-enterprice>=X AND holding>0, 0,marketr );
开空止损:sellshort(c-enterprice>=X AND holding<0, 0,marketr);
开多止损:sell( enterprice-c>=X AND holding>0, 0,marketr );