GetMaximumLotsForDeltaBuyingPowerParameters
QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters
GetMaximumLotsForDeltaBuyingPowerParameters(
portfolio: SecurityPortfolioManager,
position_group: IPositionGroup,
delta_buying_power: float,
minimum_order_margin_portfolio_percentage: float,
silence_non_error_reasons: bool = False,
)
Bases: Object
Defines the parameters for IPositionGroupBuyingPowerModel.get_maximum_lots_for_delta_buying_power
Initializes a new instance of the GetMaximumLotsForDeltaBuyingPowerParameters class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
portfolio
|
SecurityPortfolioManager
|
The algorithm's portfolio manager |
required |
position_group
|
IPositionGroup
|
The position group |
required |
delta_buying_power
|
float
|
The delta buying power to apply. Sign defines the position side to apply the delta |
required |
minimum_order_margin_portfolio_percentage
|
float
|
Configurable minimum order margin portfolio percentage to ignore orders with unrealistic small sizes |
required |
silence_non_error_reasons
|
bool
|
True will not return GetMaximumLotsResult.reason set for non error situation, this is for performance |
False
|
delta_buying_power
delta_buying_power: float
The delta buying power.
silence_non_error_reasons
silence_non_error_reasons: bool
True enables the IBuyingPowerModel to skip setting GetMaximumLotsResult.reason for non error situations, for performance
minimum_order_margin_portfolio_percentage
minimum_order_margin_portfolio_percentage: float
Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes
zero
zero() -> GetMaximumLotsResult
zero(reason: str) -> GetMaximumLotsResult
Signature descriptions:
-
Creates a new GetMaximumLotsResult with zero quantity and no message.
-
Creates a new GetMaximumLotsResult with zero quantity and an info message.
error
error(reason: str) -> GetMaximumLotsResult
Creates a new GetMaximumLotsResult with zero quantity and an error message.
result
result(quantity: float) -> GetMaximumLotsResult
Creates a new GetMaximumLotsResult for the specified quantity and no message.