bbgo: add more injection types

This commit is contained in:
c9s 2022-03-05 12:49:53 +08:00
parent a9f9fa8fed
commit bdcae5b763

View File

@ -245,7 +245,15 @@ func (trader *Trader) RunSingleExchangeStrategy(ctx context.Context, strategy Si
return fmt.Errorf("marketDataStore of symbol %s not found", symbol)
}
if err := parseStructAndInject(strategy, market, indicatorSet, store); err != nil {
if err := parseStructAndInject(strategy,
market,
indicatorSet,
store,
session,
session.OrderExecutor,
); err != nil {
return errors.Wrapf(err, "failed to inject object into %T", strategy)
}
}