This commit is contained in:
c9s 2022-07-04 12:16:22 +08:00
parent 7f48d834f5
commit f239eb16c1
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -257,9 +257,9 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
In the above example, we register our event callback to the market data stream of the current exchange session, The In the above example, we register our event callback to the market data stream of the current exchange session, The
market data stream object here is a session-wide market data stream, so it's shared with other strategies that are also market data stream object here is a session-wide market data stream, so it's shared with other strategies that are also
using the same exchange session, you might receive kline with different symbol or interval. using the same exchange session, so you might receive kline with different symbol or interval.
so it's better to add a condition to filter the kline events: It's better to add a condition to filter the kline events:
```go ```go
func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error { func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) error {