Skip to content
All library documents

Why Imported Historical Data May Not Trigger Simulated Trades

Article SuperMind

Summary

The discussion explains why a strategy can run in a historical backtest yet place no trades in simulated trading. Imported historical bars support backtests and indicator initialization, while a live simulation generally depends on real-time tick or bar updates to invoke the strategy’s event handlers. The response identifies several checks: confirm that market data is subscribed for the contract, that the contract identifier matches, and that strategy initialization completed successfully.

For strategies using an array manager, the post notes that the default setup needs 100 bars before it is initialized; insufficient history can cause strategy logic to return before placing orders. It also describes recording live data so it can be stored and used during initialization, and recommends checking strategy status, variable values, and logs. These are practical troubleshooting steps rather than evidence from a controlled test. Actual requirements can depend on the gateway, data service, contract, and strategy configuration, so the suggested causes should be checked against the user’s setup.

Key ideas

  • Historical bars used in backtesting do not by themselves generate real-time events in simulated trading.
  • Simulated strategies generally need a connected data feed and a successful subscription to the intended contract.
  • Strategies using the default array manager need enough historical bars to initialize before their trading logic runs.
  • Recording live data can provide both initialization history and ongoing market updates.
  • Status fields, strategy variables, and logs can help distinguish initialization and subscription problems.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.