Lean
$LEAN_TAG$
|
Transaction handlers define how the transactions are processed and set the order fill information. The pass this information back to the algorithm portfolio and ensure the cash and portfolio are synchronized. More...
Public Member Functions | |
void | Initialize (IAlgorithm algorithm, IBrokerage brokerage, IResultHandler resultHandler) |
Initializes the transaction handler for the specified algorithm using the specified brokerage implementation More... | |
void | Exit () |
Signal a end of thread request to stop montioring the transactions. More... | |
void | ProcessSynchronousEvents () |
Process any synchronous events from the primary algorithm thread. More... | |
void | AddOpenOrder (Order order, IAlgorithm algorithm) |
Register an already open Order More... | |
Public Member Functions inherited from QuantConnect.Securities.IOrderProcessor | |
OrderTicket | Process (OrderRequest request) |
Adds the specified order to be processed More... | |
Public Member Functions inherited from QuantConnect.Securities.IOrderProvider | |
Order | GetOrderById (int orderId) |
Get the order by its id More... | |
List< Order > | GetOrdersByBrokerageId (string brokerageId) |
Gets the Lean orders by its brokerage id More... | |
IEnumerable< OrderTicket > | GetOrderTickets (Func< OrderTicket, bool > filter=null) |
Gets and enumerable of OrderTicket matching the specified filter More... | |
IEnumerable< OrderTicket > | GetOpenOrderTickets (Func< OrderTicket, bool > filter=null) |
Gets and enumerable of opened OrderTicket matching the specified filter More... | |
OrderTicket | GetOrderTicket (int orderId) |
Gets the order ticket for the specified order id. Returns null if not found More... | |
IEnumerable< Order > | GetOrders (Func< Order, bool > filter=null) |
Gets all orders matching the specified filter. Specifying null will return an enumerable of all orders. More... | |
List< Order > | GetOpenOrders (Func< Order, bool > filter=null) |
Gets open orders matching the specified filter. Specifying null will return an enumerable of all open orders. More... | |
Properties | |
bool | IsActive [get] |
Boolean flag indicating the thread is busy. False indicates it is completely finished processing and ready to be terminated. More... | |
ConcurrentDictionary< int, Order > | Orders [get] |
Gets the permanent storage for all orders More... | |
IEnumerable< OrderEvent > | OrderEvents [get] |
Gets all order events More... | |
ConcurrentDictionary< int, OrderTicket > | OrderTickets [get] |
Gets the permanent storage for all order tickets More... | |
Properties inherited from QuantConnect.Securities.IOrderProvider | |
int | OrdersCount [get] |
Gets the current number of orders that have been processed More... | |
Additional Inherited Members | |
Events inherited from QuantConnect.Securities.IOrderEventProvider | |
EventHandler< OrderEvent > | NewOrderEvent |
Event fired when there is a new OrderEvent More... | |
Transaction handlers define how the transactions are processed and set the order fill information. The pass this information back to the algorithm portfolio and ensure the cash and portfolio are synchronized.
Definition at line 32 of file ITransactionHandler.cs.
void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.Initialize | ( | IAlgorithm | algorithm, |
IBrokerage | brokerage, | ||
IResultHandler | resultHandler | ||
) |
Initializes the transaction handler for the specified algorithm using the specified brokerage implementation
Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler, and QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler.
void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.Exit | ( | ) |
Signal a end of thread request to stop montioring the transactions.
Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler.
void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.ProcessSynchronousEvents | ( | ) |
Process any synchronous events from the primary algorithm thread.
Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler, and QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler.
void QuantConnect.Lean.Engine.TransactionHandlers.ITransactionHandler.AddOpenOrder | ( | Order | order, |
IAlgorithm | algorithm | ||
) |
Register an already open Order
Implemented in QuantConnect.Lean.Engine.TransactionHandlers.BrokerageTransactionHandler.
|
get |
Boolean flag indicating the thread is busy. False indicates it is completely finished processing and ready to be terminated.
Definition at line 39 of file ITransactionHandler.cs.
|
get |
Gets the permanent storage for all orders
Definition at line 47 of file ITransactionHandler.cs.
|
get |
Gets all order events
Definition at line 54 of file ITransactionHandler.cs.
|
get |
Gets the permanent storage for all order tickets
Definition at line 60 of file ITransactionHandler.cs.