mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
Fix accounts field
This commit is contained in:
parent
b00c9f0c0d
commit
9c08bea065
|
@ -397,8 +397,13 @@ var BacktestCmd = &cobra.Command{
|
||||||
|
|
||||||
report := calculator.Calculate(symbol, trades.Trades, lastPrice)
|
report := calculator.Calculate(symbol, trades.Trades, lastPrice)
|
||||||
report.Print()
|
report.Print()
|
||||||
|
|
||||||
|
accountConfig, ok := userConfig.Backtest.Accounts[exchangeName]
|
||||||
|
if !ok {
|
||||||
|
accountConfig = userConfig.Backtest.Account[exchangeName]
|
||||||
|
}
|
||||||
|
|
||||||
initBalances := userConfig.Backtest.Account[exchangeName].Balances.BalanceMap()
|
initBalances := accountConfig.Balances.BalanceMap()
|
||||||
finalBalances := session.GetAccount().Balances()
|
finalBalances := session.GetAccount().Balances()
|
||||||
|
|
||||||
log.Infof("INITIAL BALANCES:")
|
log.Infof("INITIAL BALANCES:")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user