mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
xgap: check sourceSymbol
This commit is contained in:
parent
ab9faba1af
commit
e67a6c56c9
|
@ -170,7 +170,7 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se
|
||||||
s.mu.Unlock()
|
s.mu.Unlock()
|
||||||
})
|
})
|
||||||
|
|
||||||
if s.SourceExchange != "" {
|
if s.SourceExchange != "" && s.SourceSymbol != "" {
|
||||||
s.sourceBook = types.NewStreamBook(s.SourceSymbol, sourceSession.ExchangeName)
|
s.sourceBook = types.NewStreamBook(s.SourceSymbol, sourceSession.ExchangeName)
|
||||||
s.sourceBook.BindStream(s.sourceSession.MarketDataStream)
|
s.sourceBook.BindStream(s.sourceSession.MarketDataStream)
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,6 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se
|
||||||
}
|
}
|
||||||
|
|
||||||
s.placeOrders(ctx)
|
s.placeOrders(ctx)
|
||||||
|
|
||||||
s.cancelOrders(ctx)
|
s.cancelOrders(ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user