Group (combo) orders extension methods for easiest combo order manipulation
More...
|
static bool | TryGetGroupOrders (this Order order, Func< int, Order > orderProvider, out List< Order > orders) |
| Gets the grouped orders (legs) of a group order More...
|
|
static bool | TryGetGroupOrdersSecurities (this List< Order > orders, ISecurityProvider securityProvider, out Dictionary< Order, Security > securities) |
| Gets the securities corresponding to each order in the group More...
|
|
static string | GetErrorMessage (this Dictionary< Order, Security > securities, HasSufficientBuyingPowerForOrderResult hasSufficientBuyingPowerResult) |
| Returns an error string message saying there is insufficient buying power for the given orders associated with their respective securities More...
|
|
static decimal | GetOrderLegGroupQuantity (this decimal legRatio, GroupOrderManager groupOrderManager) |
| Gets the combo order leg group quantity, that is, the total number of shares to be bought/sold from this leg, from its ratio and the group order quantity More...
|
|
static decimal | GetOrderLegRatio (this decimal legGroupQuantity, GroupOrderManager groupOrderManager) |
| Gets the combo order leg ratio from its group quantity and the group order quantity More...
|
|
Group (combo) orders extension methods for easiest combo order manipulation
Definition at line 27 of file GroupOrderExtensions.cs.
◆ TryGetGroupOrders()
static bool QuantConnect.Orders.GroupOrderExtensions.TryGetGroupOrders |
( |
this Order |
order, |
|
|
Func< int, Order > |
orderProvider, |
|
|
out List< Order > |
orders |
|
) |
| |
|
static |
Gets the grouped orders (legs) of a group order
- Parameters
-
order | Target order, which can be any of the legs of the combo |
orderProvider | Order provider to use to access the existing orders |
orders | List of orders in the combo |
- Returns
- False if any of the orders in the combo is not yet found in the order provider. True otherwise
If the target order is not a combo order, the resulting list will contain that single order alone
Definition at line 37 of file GroupOrderExtensions.cs.
◆ TryGetGroupOrdersSecurities()
static bool QuantConnect.Orders.GroupOrderExtensions.TryGetGroupOrdersSecurities |
( |
this List< Order > |
orders, |
|
|
ISecurityProvider |
securityProvider, |
|
|
out Dictionary< Order, Security > |
securities |
|
) |
| |
|
static |
Gets the securities corresponding to each order in the group
- Parameters
-
orders | List of orders to map |
securityProvider | The security provider to use |
securities | The resulting map of order to security |
- Returns
- True if the mapping is successful, false otherwise.
Definition at line 82 of file GroupOrderExtensions.cs.
◆ GetErrorMessage()
Returns an error string message saying there is insufficient buying power for the given orders associated with their respective securities
Definition at line 103 of file GroupOrderExtensions.cs.
◆ GetOrderLegGroupQuantity()
static decimal QuantConnect.Orders.GroupOrderExtensions.GetOrderLegGroupQuantity |
( |
this decimal |
legRatio, |
|
|
GroupOrderManager |
groupOrderManager |
|
) |
| |
|
static |
Gets the combo order leg group quantity, that is, the total number of shares to be bought/sold from this leg, from its ratio and the group order quantity
- Parameters
-
legRatio | The leg ratio |
groupOrderManager | The group order manager |
- Returns
- The total number of shares to be bought/sold from this leg
Definition at line 115 of file GroupOrderExtensions.cs.
◆ GetOrderLegRatio()
static decimal QuantConnect.Orders.GroupOrderExtensions.GetOrderLegRatio |
( |
this decimal |
legGroupQuantity, |
|
|
GroupOrderManager |
groupOrderManager |
|
) |
| |
|
static |
Gets the combo order leg ratio from its group quantity and the group order quantity
- Parameters
-
legGroupQuantity | The total number of shares to be bought/sold from this leg, that is, the result of the let ratio times the group quantity |
groupOrderManager | The group order manager |
- Returns
- The ratio of this combo order leg
Definition at line 128 of file GroupOrderExtensions.cs.
The documentation for this class was generated from the following file: