mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
grid2: sub 1 only when num > 0
This commit is contained in:
parent
6ae5d2f33a
commit
f11d869d02
|
@ -778,9 +778,8 @@ func (s *Strategy) calculateBaseQuoteInvestmentQuantity(quoteInvestment, baseInv
|
|||
}
|
||||
|
||||
// avoid placing a sell order above the last price
|
||||
numberOfSellOrders--
|
||||
if numberOfSellOrders < 0 {
|
||||
numberOfSellOrders = 0
|
||||
if numberOfSellOrders > 0 {
|
||||
numberOfSellOrders--
|
||||
}
|
||||
|
||||
// if the maxBaseQuantity is less than minQuantity, then we need to reduce the number of the sell orders
|
||||
|
|
Loading…
Reference in New Issue
Block a user