Expected Behavior
If the data susbcription includes extended market hours, but the order property OutsideRegularTradingHours is false, the orders can't be filled.
Actual Behavior
OutsideRegularTradingHours is not accounted for.
namespace QuantConnect.Algorithm.CSharp
{
public class GeekyRedDogfish : QCAlgorithm
{
public override void Initialize()
{
SetStartDate(2026, 5, 5);
SetEndDate(2026, 5, 5);
SetCash(100000);
AddEquity("SPY", Resolution.Minute, extendedMarketHours: true);
}
public override void OnData(Slice data)
{
foreach (var kvp in data.Bars)
{
var symbol = kvp.Key;
if (Time.TimeOfDay == new TimeSpan(9, 29, 0))
{
OrderProperties prop = new TradeStationOrderProperties
{
TimeInForce = TimeInForce.Day,
OutsideRegularTradingHours = false,
};
var stopOrder = StopMarketOrder(
symbol,
10,
1.0m,
tag: "my tag",
orderProperties: prop
);
}
}
}
}
}
Potential Solution
N/A
Checklist
Expected Behavior
If the data susbcription includes extended market hours, but the order property OutsideRegularTradingHours is false, the orders can't be filled.
Actual Behavior
OutsideRegularTradingHours is not accounted for.
Potential Solution
N/A
Checklist
masterbranch