0
Follow
0
Followers
acc = _C(exchanges[0].GetAccount)
acc1 = acc.Balance
if tickers_new.Last < 100000:
id = exchanges[0].Buy(tickers_new.Last, buycash)
a = tickers_new.Last
b = buycash
c = a
d = b
avg = ((a+c)*(b+d))/a+c
Log("持仓成本:",avg,"账户余额",acc1)
tickers_new.Last 最新价格 buycash 买入份数
请问如何实现计算持仓成本啊?
计算出来的数据都是不对的,
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 (1)
- 1
