Lean  $LEAN_TAG$
QuantConnect.Orders.Fills.FutureFillModel Class Reference

Represents the fill model used to simulate order fills for futures More...

Inheritance diagram for QuantConnect.Orders.Fills.FutureFillModel:
[legend]

Public Member Functions

override OrderEvent MarketFill (Security asset, MarketOrder order)
 Default market fill model for the base security class. Fills at the last traded price. More...
 
override OrderEvent StopMarketFill (Security asset, StopMarketOrder order)
 Stop fill model implementation for Future. More...
 
- Public Member Functions inherited from QuantConnect.Orders.Fills.FillModel
void SetPythonWrapper (FillModelPythonWrapper pythonWrapper)
 Used to set the FillModelPythonWrapper instance if any More...
 
virtual Fill Fill (FillModelParameters parameters)
 Return an order event with the fill details More...
 
virtual List< OrderEventComboMarketFill (Order order, FillModelParameters parameters)
 Default combo market fill model for the base security class. Fills at the last traded price for each leg. More...
 
virtual List< OrderEventComboLimitFill (Order order, FillModelParameters parameters)
 Default combo limit fill model for the base security class. Fills at the sum of prices for the assets of every leg. More...
 
virtual List< OrderEventComboLegLimitFill (Order order, FillModelParameters parameters)
 Default combo limit fill model for the base security class. Fills at the limit price for each leg More...
 
virtual OrderEvent TrailingStopFill (Security asset, TrailingStopOrder order)
 Default trailing stop fill model implementation in base class security. (Trailing Stop Order Type) More...
 
virtual OrderEvent StopLimitFill (Security asset, StopLimitOrder order)
 Default stop limit fill model implementation in base class security. (Stop Limit Order Type) More...
 
virtual OrderEvent LimitIfTouchedFill (Security asset, LimitIfTouchedOrder order)
 Default limit if touched fill model implementation in base class security. (Limit If Touched Order Type) More...
 
virtual OrderEvent LimitFill (Security asset, LimitOrder order)
 Default limit order fill model in the base security class. More...
 
virtual OrderEvent MarketOnOpenFill (Security asset, MarketOnOpenOrder order)
 Market on Open Fill Model. Return an order event with the fill details More...
 
virtual OrderEvent MarketOnCloseFill (Security asset, MarketOnCloseOrder order)
 Market on Close Fill Model. Return an order event with the fill details More...
 

Additional Inherited Members

- Protected Member Functions inherited from QuantConnect.Orders.Fills.FillModel
virtual HashSet< Type > GetSubscribedTypes (Security asset)
 Get data types the Security is subscribed to More...
 
virtual Prices GetPricesCheckingPythonWrapper (Security asset, OrderDirection direction)
 This is required due to a limitation in PythonNet to resolved overriden methods. GetPrices More...
 
virtual Prices GetPrices (Security asset, OrderDirection direction)
 Get the minimum and maximum price for this security in the last bar: More...
 
virtual bool IsExchangeOpen (Security asset, bool isExtendedMarketHours)
 Determines if the exchange is open using the current time of the asset More...
 
- Protected Attributes inherited from QuantConnect.Orders.Fills.FillModel
FillModelPythonWrapper PythonWrapper
 This is required due to a limitation in PythonNet to resolved overriden methods. When Python calls a C# method that calls a method that's overriden in python it won't run the python implementation unless the call is performed through python too. More...
 
- Properties inherited from QuantConnect.Orders.Fills.FillModel
FillModelParameters Parameters [get, set]
 The parameters instance to be used by the different XxxxFill() implementations More...
 

Detailed Description

Represents the fill model used to simulate order fills for futures

Definition at line 27 of file FutureFillModel.cs.

Member Function Documentation

◆ MarketFill()

override OrderEvent QuantConnect.Orders.Fills.FutureFillModel.MarketFill ( Security  asset,
MarketOrder  order 
)
virtual

Default market fill model for the base security class. Fills at the last traded price.

Parameters
assetSecurity asset we're filling
orderOrder packet to model
Returns
Order fill information detailing the average price and quantity filled.

Reimplemented from QuantConnect.Orders.Fills.FillModel.

Definition at line 35 of file FutureFillModel.cs.

Here is the call graph for this function:

◆ StopMarketFill()

override OrderEvent QuantConnect.Orders.Fills.FutureFillModel.StopMarketFill ( Security  asset,
StopMarketOrder  order 
)
virtual

Stop fill model implementation for Future.

Parameters
assetSecurity asset we're filling
orderOrder packet to model
Returns
Order fill information detailing the average price and quantity filled.

A Stop order is an instruction to submit a buy or sell market order if and when the user-specified stop trigger price is attained or penetrated.

A Sell Stop order is always placed below the current market price. We assume a fluid/continuous, high volume market. Therefore, it is filled at the stop trigger price if the current low price of trades is less than or equal to this price.

A Buy Stop order is always placed above the current market price. We assume a fluid, high volume market. Therefore, it is filled at the stop trigger price if the current high price of trades is greater or equal than this price.

The continuous market assumption is not valid if the market opens with an unfavorable gap. In this case, a new bar opens below/above the stop trigger price, and the order is filled with the opening price.

See also
MarketFill(Security, MarketOrder)

Reimplemented from QuantConnect.Orders.Fills.FillModel.

Definition at line 100 of file FutureFillModel.cs.

Here is the call graph for this function:

The documentation for this class was generated from the following file: