Type/to search
0
Follow
4
Followers
求助, 死活卖不了, 显示: Sell(0.11487, 45): Invalid direction
Help
Created 2021-09-19 17:16:27  
 2
 985

求助 买入成功, 卖出条件达到了, 就死活卖不了,一直显示 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);
}

Related Recommendations
Comment
All comments (2)

    无语,果然是这个问题, 写错了......

    5 years ago

    exchange.SetDirection("closebuy");

    5 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)