grid2: fix comparison

This commit is contained in:
c9s 2023-05-22 18:20:34 +08:00
parent ce2bd7ca7d
commit d5cf53ee94
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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
}