Type/to search
0
Follow
0
Followers
Trợ giúp, trao đổi.Mua lỗi,
Help
Created 2021-01-18 09:07:21  
 1
 1336

Chiến lược cân bằng đồng tiền mặt được sao chép, không sửa đổi trước khi gặp lỗi chính xác giao dịch trên sàn giao dịch BTC3S_USDT, sửa đổi như sau:
193: trade (('buy', buy_price.toFixed ((6), buy_value.toFixed ((4), 'mua để cân bằng')
194: trade (('sell', sell_price.toFixed ((6), sell_value.toFixed ((4), 'bán thặng dư')
InternalError: bad argument #3 to 'Exchange_Trade' (float64 expected, got string) at <anonymous> (native) at Buy (FILE) at trade (FILE:139) at onTick (FILE:193) at main (FILE:205)
Trong tài liệu API, hai tham số được chuyển qua bởi exchange.Buy ((Price, Amount) trong chiến lược cân bằng đồng tiền hiện tại là:
139 id = exchange.Buy(price, amount, msg)
Sau khi xóa 3 tham số msg vẫn báo lỗi như trên, cảm giác là toFixed() đã sử dụng sai, tìm đúng cách cắt số chữ số số nhỏ

Related Recommendations
Comment
All comments (1)

    参数需要时数字,结果得到了字符串,用FMZ自带的_N函数,文档里有

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