mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
grid2: pull out sell boolean var
This commit is contained in:
parent
0c6ef38ea3
commit
2046ccc791
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user