Type/to search
0
Follow
36
Followers
実際の注文数量が注文前に印刷された数量と一致しない
Help
Created 2021-04-30 06:59:35  
 5
 1286

img

2021-04-30 06:49:07 Futures_Binance 誤り Buy ((22.7789, 0): 400: {"code":-4003,"msg":"Quantity less than zero. "} バイナンス バイナンス バイナンス バイナンス
2021-04-30 06:49:07 情報を buy_price: 22.7789 buy_amount: 0.5888040136226255 WAVES_USDT
2021-04-30 06:49:07 Futures_Binance エラー Sell ((22.9508, 0): 400: {"code":-4003,"msg":"Quantity less than zero. "} バイナンス バイナンス バイナンス バイナンス バイナンス
2021年4月30日 06:49:07 情報を販売する価格: 22.9508 position[0]["Amount"]: 0.8 WAVES_USDT

下は,注文前に印刷された日記です. 実際に0.8のポジションを保持し,平仓の時は0の注文でした.

Related Recommendations
Comment
All comments (5)

    精度设为0了吧,int(0.8)=0

    5 years ago

    position=_C(e.GetPosition)
    sell_price=position[0]['Price']*params1["pingduo"][index]
    Log('sell_price:',round(sell_price,int(params1["arrPricePrecision"][index])),'position[0]["Amount"]:',position[0]["Amount"],e.GetCurrency())
    firstInfo=e.Sell(round(sell_price,int(params1["arrPricePrecision"][index])) ,position[0]["Amount"],e.GetCurrency())
    --草神,不好意思,这个是代码,直接用的 position[0]["Amount"] ,但是下单还是下成了0,已经不知道哪里问题了,头疼死了

    5 years ago

    精度打印过,没错,这个报错是时有时没有,我再检查检查代码,看看是不是有串了,谢谢草神,再有问题再打扰您

    5 years ago

    position=_C(e.GetPosition)
    sell_price=position[0]['Price']*params1["pingduo"][index]
    Log('sell_price:',round(sell_price,int(params1["arrPricePrecision"][index])),'position[0]["Amount"]:',position[0]["Amount"],e.GetCurrency())

    firstInfo=e.Sell(round(sell_price,int(params1["arrPricePrecision"][index])) ,position[0]["Amount"],e.GetCurrency())
    params1["close_buy_order"][index]['id'] = firstInfo
    params1["close_buy_order"][index]['price'] = round(sell_price,int(params1["arrPricePrecision"][index]))
    params1["close_buy_order"][index]['amount']=position[0]["Amount"]

    --这个是策略代码

    5 years ago

    position=_C(e.GetPosition)
    sell_price=position[0]['Price']*params1["pingduo"][index]

    Log('sell_price:',round(sell_price,int(params1["arrPricePrecision"][index])),'position[0]["Amount"]:',position[0]["Amount"],e.GetCurrency())

    firstInfo=e.Sell(round(sell_price,int(params1["arrPricePrecision"][index])) ,position[0]["Amount"],e.GetCurrency())
    params1["close_buy_order"][index]['id'] = firstInfo
    params1["close_buy_order"][index]['price'] = round(sell_price,int(params1["arrPricePrecision"][index]))
    params1["close_buy_order"][index]['amount']=position[0]["Amount"]

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