Skip to content

Commit

Permalink
fix: validation: asset.Subscription -> ConfigProvider.GetSubscription…
Browse files Browse the repository at this point in the history
…Data

fix:style: missed braces
  • Loading branch information
Romazes committed Jan 10, 2024
1 parent 1d835cd commit 19d7cbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public override void OnEndOfAlgorithm()
var stopMarketOrders = Transactions.GetOrders(x => x is StopMarketOrder);

if (stopMarketOrders.Any(x => x.Status != OrderStatus.Filled))
{
throw new Exception("The Algorithms was not handled any StopMarketOrders");
}
}

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion Common/Orders/Fills/FutureFillModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

using System;
using QuantConnect.Util;
using QuantConnect.Data;
using QuantConnect.Securities;
using QuantConnect.Orders.Fees;
Expand Down Expand Up @@ -106,7 +107,7 @@ public override OrderEvent StopMarketFill(Security asset, StopMarketOrder order)
if (order.Status == OrderStatus.Canceled) return fill;

// Fill only if open or extended
if (!IsExchangeOpen(asset, asset.Subscriptions.IsExtendedMarketHours()))
if (!IsExchangeOpen(asset, Parameters.ConfigProvider.GetSubscriptionDataConfigs(asset.Symbol, asset.IsInternalFeed()).IsExtendedMarketHours()))
{
return fill;
}
Expand Down

0 comments on commit 19d7cbc

Please sign in to comment.