Provides methods for computing a maximum order size.
More...
|
static decimal | GetOrderSizeForPercentVolume (Security security, decimal maximumPercentCurrentVolume, decimal desiredOrderSize) |
| Adjust the provided order size to respect maximum order size based on a percentage of current volume. More...
|
|
static decimal | GetOrderSizeForMaximumValue (Security security, decimal maximumOrderValueInAccountCurrency, decimal desiredOrderSize) |
| Adjust the provided order size to respect the maximum total order value More...
|
|
static decimal | GetUnorderedQuantity (IAlgorithm algorithm, IPortfolioTarget target) |
| Gets the remaining quantity to be ordered to reach the specified target quantity. More...
|
|
static decimal | GetUnorderedQuantity (IAlgorithm algorithm, IPortfolioTarget target, Security security, bool accountForFees=false) |
| Gets the remaining quantity to be ordered to reach the specified target quantity. More...
|
|
static decimal | AdjustByLotSize (Security security, decimal quantity) |
| Adjusts the provided order quantity to respect the securities lot size. If the quantity is missing 1M part of the lot size it will be rounded up since we suppose it's due to floating point error, this is required to avoid diff between Py and C# More...
|
|
Provides methods for computing a maximum order size.
Definition at line 28 of file OrderSizing.cs.
◆ GetOrderSizeForPercentVolume()
static decimal QuantConnect.Orders.OrderSizing.GetOrderSizeForPercentVolume |
( |
Security |
security, |
|
|
decimal |
maximumPercentCurrentVolume, |
|
|
decimal |
desiredOrderSize |
|
) |
| |
|
static |
Adjust the provided order size to respect maximum order size based on a percentage of current volume.
- Parameters
-
security | The security object |
maximumPercentCurrentVolume | The maximum percentage of the current bar's volume |
desiredOrderSize | The desired order size to adjust |
- Returns
- The signed adjusted order size
Definition at line 37 of file OrderSizing.cs.
◆ GetOrderSizeForMaximumValue()
static decimal QuantConnect.Orders.OrderSizing.GetOrderSizeForMaximumValue |
( |
Security |
security, |
|
|
decimal |
maximumOrderValueInAccountCurrency, |
|
|
decimal |
desiredOrderSize |
|
) |
| |
|
static |
Adjust the provided order size to respect the maximum total order value
- Parameters
-
security | The security object |
maximumOrderValueInAccountCurrency | The maximum order value in units of the account currency |
desiredOrderSize | The desired order size to adjust |
- Returns
- The signed adjusted order size
Definition at line 52 of file OrderSizing.cs.
◆ GetUnorderedQuantity() [1/2]
Gets the remaining quantity to be ordered to reach the specified target quantity.
- Parameters
-
algorithm | The algorithm instance |
target | The portfolio target |
- Returns
- The signed remaining quantity to be ordered
Definition at line 75 of file OrderSizing.cs.
◆ GetUnorderedQuantity() [2/2]
Gets the remaining quantity to be ordered to reach the specified target quantity.
- Parameters
-
algorithm | The algorithm instance |
target | The portfolio target |
security | The target security |
accountForFees | True for taking into account the fee's in the order quantity. False, otherwise. |
- Returns
- The signed remaining quantity to be ordered
Definition at line 91 of file OrderSizing.cs.
◆ AdjustByLotSize()
static decimal QuantConnect.Orders.OrderSizing.AdjustByLotSize |
( |
Security |
security, |
|
|
decimal |
quantity |
|
) |
| |
|
static |
Adjusts the provided order quantity to respect the securities lot size. If the quantity is missing 1M part of the lot size it will be rounded up since we suppose it's due to floating point error, this is required to avoid diff between Py and C#
- Parameters
-
security | The security instance |
quantity | The desired quantity to adjust, can be signed |
- Returns
- The signed adjusted quantity
Definition at line 121 of file OrderSizing.cs.
The documentation for this class was generated from the following file: