Skip to content
All library documents

Handling Bar-Close Signals When the Market Is Closed

Article vn.py community

Summary

This short forum exchange discusses a timing problem in a 15-minute bar strategy: a signal is generated when a bar closes during a trading break, so an order submitted immediately may fail because the market is closed. The question also raises the possibility of the same issue at session closing times and asks how to submit an order as soon as trading resumes.

The response offers a brief implementation direction: retain the order identifier and track order status, then use those states in the strategy’s decision logic. This points toward managing pending orders across the closed interval rather than treating the signal and order submission as a single event. The exchange provides no code, platform-specific event details, or worked example, and it does not establish how to handle stale signals, price changes, or order validity when the session reopens.

Key ideas

  • A bar-close signal can occur during a break or after the market has closed.
  • An immediate order submission may fail when trading is unavailable.
  • The reply recommends caching order identifiers and tracking order states in strategy logic.
  • The exchange does not specify how to handle stale signals or changing prices at the next open.

Tags

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