0
Follow
4
Followers
求助 买入成功, 卖出条件达到了, 就死活卖不了,一直显示 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
How to Specify Different Versions of Data for the Rented Strategy by Its Rental Code MetadataAdvanced Tutorial for FMZ Quant platform Strategy WritingElementary Tutorial for FMZ Quant platform Strategy WritingGet Started with FMZ Quant PlatformSECURITY BUGI keep getting error: Exchange_GetAccount: Invalid ContractTypeWe have an incredibly profitable market making algorithm for sideways markets on Bitmex - but need expert to help eliminate wait times during downward volatility in the marketError with deribitLimitations of the backtesting engineHow to install ta-lib on linux docker?
Comment
All comments (2)
- 1
