support: add target orders to the orders

This commit is contained in:
c9s 2021-05-31 01:03:43 +08:00
parent e5db780be8
commit f66095eff9

View File

@ -312,10 +312,11 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
})
}
_, err = orderExecutor.SubmitOrders(ctx, targetOrders...)
createdOrders, err = orderExecutor.SubmitOrders(ctx, targetOrders...)
if err != nil {
log.WithError(err).Error("submit profit target order error")
}
s.orderStore.Add(createdOrders...)
})
s.Graceful.OnShutdown(func(ctx context.Context, wg *sync.WaitGroup) {