pivotshort: fix trade loss ratio

This commit is contained in:
c9s 2022-07-21 13:17:46 +08:00
parent 88c0f31e87
commit 15879adf3b
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -262,7 +262,7 @@ func useQuantityOrBaseBalance(session *bbgo.ExchangeSession, market types.Market
accountValue := baseBalanceValue.Add(quoteBalance.Net())
// avoid using all account value since there will be some trade loss for interests and the fee
accountValue = accountValue.Mul(one.Sub(fixedpoint.NewFromFloat(0.9)))
accountValue = accountValue.Mul(one.Sub(fixedpoint.NewFromFloat(0.01)))
log.Infof("calculated account value %f %s", accountValue.Float64(), market.QuoteCurrency)