avatar of xionglonghui xionglonghui
关注 私信
0
关注
4
关注者

求助, 死活卖不了, 显示: Sell(0.11487, 45): Invalid direction

创建于: 2021-09-19 17:16:27, 更新于:
comments   2
hits   725

求助 买入成功, 卖出条件达到了, 就死活卖不了,一直显示 Sell(0.11487, 45): Invalid direction

第一: 小数点后面的进度没有问题. 第二: 设置卖出方向为closebuy, 卖出平多仓. 也没错啊.

代码如下: 我用的是币安期货永续合约, 有遇到过并解决了此问题的朋友帮忙解答一下.

exchange.SetDirection(“buyclose”);

var order_id2 = exchange.Sell(now_records.Close, trade_amount);

Sleep(2000);

while (order_id2 == null || typeof(order_id) == “undefined”) //没卖出,继续在价格上加滑点卖 { exchange.SetDirection(“buyclose”); order_id = exchange.Sell(now_records.Close + huadian, trade_amount); //每个滑点(huadian)是0.00001 Sleep(2000); }

相关推荐
全部留言
avatar of xionglonghui
xionglonghui
无语,果然是这个问题, 写错了......
2021-09-19 20:57:19
avatar of 恐龙宝宝
恐龙宝宝
exchange.SetDirection("closebuy");
2021-09-19 20:31:04