mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pivotshort: fix trade loss ratio
This commit is contained in:
parent
88c0f31e87
commit
15879adf3b
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user