Skip to content

Commit

Permalink
Add missing parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Oct 25, 2024
1 parent f8f21d6 commit 2ddbd0e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tradeexecutor/strategy/pandas_trader/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,7 @@ def calculate_and_load_indicators_inline(
indicator_set: IndicatorSet | None = None,
create_indicators: CreateIndicatorsProtocol = None,
storage: IndicatorStorage | None = None,
max_workers: int | Callable = get_safe_max_workers_count,
) -> "tradeexecutor.strategy.pandas_trader.strategy_input.StrategyInputIndicators":
"""Calculate indicators in the notebook itself, before starting the backtest.
Expand Down Expand Up @@ -1830,10 +1831,9 @@ def create_indicators(
indicator_set = prepare_indicators(create_indicators, parameters, strategy_universe, execution_context, timestamp=None)

if ipython:
# Unable to fork
# Unable to fork when running on Ipython
logger.warning("IPython detected - forces calculate_and_load_indicators(max_workers=1)")
max_workers = 1
else:
max_workers = get_safe_max_workers_count()

indicator_result_map = calculate_and_load_indicators(
strategy_universe=strategy_universe,
Expand Down

0 comments on commit 2ddbd0e

Please sign in to comment.