mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
bollmaker: remove redundant log and fix return
This commit is contained in:
parent
ec8129ab87
commit
e1fc0e7b8d
|
@ -145,7 +145,8 @@ func (c *TrailingStopController) Run(ctx context.Context, session *bbgo.Exchange
|
||||||
|
|
||||||
createdOrders, err := session.Exchange.SubmitOrders(ctx, *marketOrder)
|
createdOrders, err := session.Exchange.SubmitOrders(ctx, *marketOrder)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).Errorf("stop order place error")
|
log.WithError(err).Errorf("stop market order place error")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
tradeCollector.OrderStore().Add(createdOrders...)
|
tradeCollector.OrderStore().Add(createdOrders...)
|
||||||
tradeCollector.Process()
|
tradeCollector.Process()
|
||||||
|
@ -721,7 +722,6 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
||||||
})
|
})
|
||||||
|
|
||||||
s.tradeCollector.OnTrade(func(trade types.Trade) {
|
s.tradeCollector.OnTrade(func(trade types.Trade) {
|
||||||
log.Infof("trade: %s", trade)
|
|
||||||
s.Notifiability.Notify(trade)
|
s.Notifiability.Notify(trade)
|
||||||
s.state.ProfitStats.AddTrade(trade)
|
s.state.ProfitStats.AddTrade(trade)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user