0
Follow
1
Followers
Die Funktion getposition kann nur die Positionsinformationen des ersten Kontrakthandelspaars abrufen. Kann ich eine for-Schleife verwenden, um die Positionsinformationen mehrerer Handelspaare gleichze...
Created 2021-10-16 21:24:27
14
1227
Zum Beispiel, wenn ich mehrere Paare von Verträgen habe, kann ich nur die Position des ersten Vertrags mit der Getposition erfassen, wie kann ich dann die Position der anderen Paare erfassen?
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 (14)
泪流满面,终于自己解决掉了,给大家分享一下修改后的代码:
def main():
for i in range(len(exchanges)):
exchanges[i].SetContractType("swap")
R = exchanges[i].GetRecords()
P = exchanges[i].GetPosition()
Log(R)
Log(P)
5 years ago
javascript
function main() {
for (var i = 0 ; i < exchanges.length ; i++) {
var pos = exchanges[i].GetPosition()
Log(exchanges[i].GetName(), exchanges[i].GetCurrency(), "pos:", pos)
}
}
5 years ago
还是有问题,模拟回测选择币安交易所,分别是btc 与ETH交易对,程序只能获取btc行情数据,报错:品种订阅失败 ETH_USDT_Futures_Binance
我的程序如下:
def main():
exchange.SetContractType("swap")
for i in range(len(exchanges)):
R = exchanges[i].GetRecords()
P = exchanges[i].GetPosition()
account = exchange.GetAccount()
Log(R)
Log(P)
Log(account)
5 years ago
- 1

