mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
xmaker: move notify trade
This commit is contained in:
parent
3789315214
commit
70284a8c0f
|
@ -521,10 +521,6 @@ func (s *Strategy) Hedge(ctx context.Context, pos fixedpoint.Value) {
|
|||
|
||||
func (s *Strategy) handleTrade(trade types.Trade) {
|
||||
s.tradeC <- trade
|
||||
|
||||
if s.NotifyTrade {
|
||||
s.Notifiability.Notify(trade)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Strategy) processTrade(trade types.Trade) {
|
||||
|
@ -537,6 +533,10 @@ func (s *Strategy) processTrade(trade types.Trade) {
|
|||
return
|
||||
}
|
||||
|
||||
if s.NotifyTrade {
|
||||
s.Notifiability.Notify(trade)
|
||||
}
|
||||
|
||||
log.Infof("identified %s trade %d with an existing order: %d", trade.Symbol, trade.ID, trade.OrderID)
|
||||
|
||||
q := fixedpoint.NewFromFloat(trade.Quantity)
|
||||
|
|
Loading…
Reference in New Issue
Block a user