mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
grid2: fix comparison
This commit is contained in:
parent
ce2bd7ca7d
commit
d5cf53ee94
|
@ -1339,7 +1339,7 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
|
|||
placeSell := price.Compare(lastPrice) >= 0
|
||||
|
||||
// override the relative price position for sell order if BaseGridNum is defined
|
||||
if s.BaseGridNum > 0 && i > len(pins)-1-s.BaseGridNum {
|
||||
if s.BaseGridNum > 0 && i >= len(pins)-1-s.BaseGridNum {
|
||||
placeSell = true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user