grid2: pull out sell boolean var

This commit is contained in:
c9s 2023-05-22 18:10:51 +08:00
parent 0c6ef38ea3
commit 2046ccc791
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -1336,8 +1336,8 @@ func (s *Strategy) generateGridOrders(totalQuote, totalBase, lastPrice fixedpoin
quantity = s.QuantityOrAmount.Amount.Div(price) quantity = s.QuantityOrAmount.Amount.Div(price)
} }
// TODO: add fee if we don't have the platform token. BNB, OKB or MAX... placeSell := price.Compare(lastPrice) >= 0
if price.Compare(lastPrice) >= 0 { if placeSell {
si = i si = i
// do not place sell order when i == 0 (the bottom of grid) // do not place sell order when i == 0 (the bottom of grid)