mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
grid2: round down before the quantity calculation
This commit is contained in:
parent
a083ec8395
commit
6ae5d2f33a
|
@ -795,8 +795,8 @@ func (s *Strategy) calculateBaseQuoteInvestmentQuantity(quoteInvestment, baseInv
|
|||
s.Market.MinQuantity)
|
||||
|
||||
if baseQuantity.Compare(minBaseQuantity) <= 0 {
|
||||
numberOfSellOrders = int(math.Floor(baseInvestment.Div(minBaseQuantity).Float64()))
|
||||
baseQuantity = s.Market.RoundUpQuantityByPrecision(minBaseQuantity)
|
||||
numberOfSellOrders = int(math.Floor(baseInvestment.Div(baseQuantity).Float64()))
|
||||
}
|
||||
|
||||
s.logger.Infof("grid base investment sell orders: %d", numberOfSellOrders)
|
||||
|
|
Loading…
Reference in New Issue
Block a user