mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
xgap: put source market loading to the same code area
This commit is contained in:
parent
6078b2e144
commit
67a1cd890e
|
@ -132,17 +132,17 @@ func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, se
|
|||
}
|
||||
s.sourceSession = sourceSession
|
||||
|
||||
s.sourceMarket, ok = s.sourceSession.Market(s.SourceSymbol)
|
||||
if !ok {
|
||||
return fmt.Errorf("source session market %s is not defined", s.Symbol)
|
||||
}
|
||||
|
||||
tradingSession, ok := sessions[s.TradingExchange]
|
||||
if !ok {
|
||||
return fmt.Errorf("trading session %s is not defined", s.TradingExchange)
|
||||
}
|
||||
s.tradingSession = tradingSession
|
||||
|
||||
s.sourceMarket, ok = s.sourceSession.Market(s.SourceSymbol)
|
||||
if !ok {
|
||||
return fmt.Errorf("source session market %s is not defined", s.Symbol)
|
||||
}
|
||||
|
||||
s.tradingMarket, ok = s.tradingSession.Market(s.Symbol)
|
||||
if !ok {
|
||||
return fmt.Errorf("trading session market %s is not defined", s.Symbol)
|
||||
|
|
Loading…
Reference in New Issue
Block a user