mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
Merge pull request #144 from Larry850806/larry/remove-unused-conditions
Remove unused conditions when generating orders
This commit is contained in:
commit
489449ddba
|
@ -120,7 +120,7 @@ func (s *Strategy) generateGridSellOrders(session *bbgo.ExchangeSession) ([]type
|
|||
gridSpread.Float64())
|
||||
|
||||
var orders []types.SubmitOrder
|
||||
for price := startPrice; s.LowerPrice <= price && price <= s.UpperPrice; price += gridSpread {
|
||||
for price := startPrice; price <= s.UpperPrice; price += gridSpread {
|
||||
var quantity fixedpoint.Value
|
||||
if s.Quantity > 0 {
|
||||
quantity = s.Quantity
|
||||
|
@ -195,7 +195,7 @@ func (s *Strategy) generateGridBuyOrders(session *bbgo.ExchangeSession) ([]types
|
|||
gridSpread.Float64())
|
||||
|
||||
var orders []types.SubmitOrder
|
||||
for price := startPrice; s.LowerPrice <= price && price <= s.UpperPrice; price -= gridSpread {
|
||||
for price := startPrice; s.LowerPrice <= price; price -= gridSpread {
|
||||
var quantity fixedpoint.Value
|
||||
if s.Quantity > 0 {
|
||||
quantity = s.Quantity
|
||||
|
|
Loading…
Reference in New Issue
Block a user