3.79K 浏览
0

from tqsdk import TqApi, TqAccount, TqSim

api = TqApi(TqSim())

position=api.get_position()

print(“多开均价: %.2f” % (account.open_price_long))
AttributeError: ‘Account’ object has no attribute ‘open_price_long’

print(“空开均价: %.2f” % (account.open_price_short))

print(“多开成本: %.2f” % (account.open_cost_long))
AttributeError: ‘Account’ object has no attribute ‘open_cost_long’

print(“空开成本: %.2f” % (account.open_cost_short))
AttributeError: ‘Account’ object has no attribute ‘open_cost_short’

print(“多持仓量: %.2f” % (account.property_pos_long))
AttributeError: ‘Account’ object has no attribute ‘property_pos_long’

print(“空持仓量: %.2f” % (account.property_pos_short))
AttributeError: ‘Account’ object has no attribute ‘property_pos_short’

葫芦-量化交易服务 已回答的问题 2020年5月14日