Lean
$LEAN_TAG$
|
Wraps a PyObject object that represents a model that simulates order fill events More...
Public Member Functions | |
FillModelPythonWrapper (PyObject model) | |
Constructor for initialising the FillModelPythonWrapper class with wrapped PyObject object More... | |
override Fill | Fill (FillModelParameters parameters) |
Return an order event with the fill details More... | |
override OrderEvent | LimitFill (Security asset, LimitOrder order) |
Limit Fill Model. Return an order event with the fill details. More... | |
override OrderEvent | LimitIfTouchedFill (Security asset, LimitIfTouchedOrder order) |
Limit if Touched Fill Model. Return an order event with the fill details. More... | |
override OrderEvent | MarketFill (Security asset, MarketOrder order) |
Model the slippage on a market order: fixed percentage of order price More... | |
override OrderEvent | MarketOnCloseFill (Security asset, MarketOnCloseOrder order) |
Market on Close Fill Model. Return an order event with the fill details More... | |
override OrderEvent | MarketOnOpenFill (Security asset, MarketOnOpenOrder order) |
Market on Open Fill Model. Return an order event with the fill details More... | |
override OrderEvent | StopLimitFill (Security asset, StopLimitOrder order) |
Stop Limit Fill Model. Return an order event with the fill details. More... | |
override OrderEvent | StopMarketFill (Security asset, StopMarketOrder order) |
Stop Market Fill Model. Return an order event with the fill details. More... | |
override OrderEvent | TrailingStopFill (Security asset, TrailingStopOrder order) |
Trailing Stop Fill Model. Return an order event with the fill details. More... | |
override List< OrderEvent > | ComboMarketFill (Order order, FillModelParameters parameters) |
Default combo market fill model for the base security class. Fills at the last traded price for each leg. More... | |
override List< OrderEvent > | ComboLimitFill (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... | |
override List< OrderEvent > | ComboLegLimitFill (Order order, FillModelParameters parameters) |
Default combo limit fill model for the base security class. Fills at the limit price for each leg More... | |
Public Member Functions inherited from QuantConnect.Orders.Fills.FillModel | |
void | SetPythonWrapper (FillModelPythonWrapper pythonWrapper) |
Used to set the FillModelPythonWrapper instance if any More... | |
Protected Member Functions | |
override Prices | GetPrices (Security asset, OrderDirection direction) |
Get the minimum and maximum price for this security in the last bar: More... | |
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 bool | IsExchangeOpen (Security asset, bool isExtendedMarketHours) |
Determines if the exchange is open using the current time of the asset More... | |
Additional Inherited Members | |
Properties inherited from QuantConnect.Orders.Fills.FillModel | |
FillModelParameters | Parameters [get, set] |
The parameters instance to be used by the different XxxxFill() implementations More... | |
FillModelPythonWrapper | PythonWrapper [get, set] |
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... | |
Wraps a PyObject object that represents a model that simulates order fill events
Definition at line 27 of file FillModelPythonWrapper.cs.
QuantConnect.Python.FillModelPythonWrapper.FillModelPythonWrapper | ( | PyObject | model | ) |
Constructor for initialising the FillModelPythonWrapper class with wrapped PyObject object
model | Represents a model that simulates order fill events |
Definition at line 35 of file FillModelPythonWrapper.cs.
|
virtual |
Return an order event with the fill details
parameters | A parameters object containing the security and order |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 49 of file FillModelPythonWrapper.cs.
|
virtual |
Limit Fill Model. Return an order event with the fill details.
asset | Stock Object to use to help model limit fill |
order | Order to fill. Alter the values directly if filled. |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 61 of file FillModelPythonWrapper.cs.
|
virtual |
Limit if Touched Fill Model. Return an order event with the fill details.
asset | Asset we're trading this order |
order | LimitIfTouchedOrder Order to Check, return filled if true |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 72 of file FillModelPythonWrapper.cs.
|
virtual |
Model the slippage on a market order: fixed percentage of order price
asset | Asset we're trading this order |
order | Order to update |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 83 of file FillModelPythonWrapper.cs.
|
virtual |
Market on Close Fill Model. Return an order event with the fill details
asset | Asset we're trading with this order |
order | Order to be filled |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 94 of file FillModelPythonWrapper.cs.
|
virtual |
Market on Open Fill Model. Return an order event with the fill details
asset | Asset we're trading with this order |
order | Order to be filled |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 105 of file FillModelPythonWrapper.cs.
|
virtual |
Stop Limit Fill Model. Return an order event with the fill details.
asset | Asset we're trading this order |
order | Stop Limit Order to Check, return filled if true |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 116 of file FillModelPythonWrapper.cs.
|
virtual |
Stop Market Fill Model. Return an order event with the fill details.
asset | Asset we're trading this order |
order | Trailing Stop Order to check, return filled if true |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 127 of file FillModelPythonWrapper.cs.
|
virtual |
Trailing Stop Fill Model. Return an order event with the fill details.
asset | Asset we're trading this order |
order | Stop Order to Check, return filled if true |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 138 of file FillModelPythonWrapper.cs.
|
virtual |
Default combo market fill model for the base security class. Fills at the last traded price for each leg.
order | Order to fill |
parameters | Fill parameters for the order |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 149 of file FillModelPythonWrapper.cs.
|
virtual |
Default combo limit fill model for the base security class. Fills at the sum of prices for the assets of every leg.
order | Order to fill |
parameters | Fill parameters for the order |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 160 of file FillModelPythonWrapper.cs.
|
virtual |
Default combo limit fill model for the base security class. Fills at the limit price for each leg
order | Order to fill |
parameters | Fill parameters for the order |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 171 of file FillModelPythonWrapper.cs.
|
protectedvirtual |
Get the minimum and maximum price for this security in the last bar:
asset | Security asset we're checking |
direction | The order direction, decides whether to pick bid or ask |
Reimplemented from QuantConnect.Orders.Fills.FillModel.
Definition at line 181 of file FillModelPythonWrapper.cs.