Skip to content

Commit 19d7cbc

Browse files
committed
fix: validation: asset.Subscription -> ConfigProvider.GetSubscriptionData
fix:style: missed braces
1 parent 1d835cd commit 19d7cbc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Algorithm.CSharp/FutureStopMarketOrderOnExtendedHoursRegressionAlgorithm.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ public override void OnEndOfAlgorithm()
100100
var stopMarketOrders = Transactions.GetOrders(x => x is StopMarketOrder);
101101

102102
if (stopMarketOrders.Any(x => x.Status != OrderStatus.Filled))
103+
{
103104
throw new Exception("The Algorithms was not handled any StopMarketOrders");
105+
}
104106
}
105107

106108
/// <summary>

Common/Orders/Fills/FutureFillModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515

1616
using System;
17+
using QuantConnect.Util;
1718
using QuantConnect.Data;
1819
using QuantConnect.Securities;
1920
using QuantConnect.Orders.Fees;
@@ -106,7 +107,7 @@ public override OrderEvent StopMarketFill(Security asset, StopMarketOrder order)
106107
if (order.Status == OrderStatus.Canceled) return fill;
107108

108109
// Fill only if open or extended
109-
if (!IsExchangeOpen(asset, asset.Subscriptions.IsExtendedMarketHours()))
110+
if (!IsExchangeOpen(asset, Parameters.ConfigProvider.GetSubscriptionDataConfigs(asset.Symbol, asset.IsInternalFeed()).IsExtendedMarketHours()))
110111
{
111112
return fill;
112113
}

0 commit comments

Comments
 (0)