Skip to content

Respect outside regular hours in fill models#9483

Open
aiSynergy37 wants to merge 4 commits into
QuantConnect:masterfrom
aiSynergy37:bug-9476-respect-regular-hours
Open

Respect outside regular hours in fill models#9483
aiSynergy37 wants to merge 4 commits into
QuantConnect:masterfrom
aiSynergy37:bug-9476-respect-regular-hours

Conversation

@aiSynergy37
Copy link
Copy Markdown
Contributor

Description

Updates fill eligibility to respect order-level outside regular trading hours settings when the order properties expose that setting. This prevents extended-hours subscriptions from filling orders that explicitly disallow outside regular trading hours.

The shared exchange-open helper now applies the order property override before checking market hours, and short bars no longer use the large-bar boundary fallback when the exchange is closed at the order time.

Related Issue

Fixes #9476

Motivation and Context

A stop market order submitted during pre-market data could fill when the subscription had extended market hours enabled, even if the order property set OutsideRegularTradingHours = false.

Requires Documentation Change

No

How Has This Been Tested?

  • dotnet build Tests\QuantConnect.Tests.csproj --no-restore -v minimal /p:RunAnalyzers=false
  • Added a regression test covering both allowed and disallowed outside-regular-hours stop market fills.

Types of Changes

  • Bug fix
  • Tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fill Model Don't Account IOrderPropeties.OutsideRegularTradingHours

2 participants