Lean
$LEAN_TAG$
|
Defines the parameters for IPositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower More...
Public Member Functions | |
GetMaximumLotsForTargetBuyingPowerParameters (SecurityPortfolioManager portfolio, IPositionGroup positionGroup, decimal targetBuyingPower, decimal minimumOrderMarginPortfolioPercentage, bool silenceNonErrorReasons=false) | |
Initializes a new instance of the GetMaximumLotsForTargetBuyingPowerParameters class More... | |
GetMaximumLotsResult | Error (string reason) |
Creates a new GetMaximumLotsResult with zero quantity and an error message. More... | |
GetMaximumLotsResult | Zero () |
Creates a new GetMaximumLotsResult with zero quantity and no message. More... | |
GetMaximumLotsResult | Zero (string reason) |
Creates a new GetMaximumLotsResult with zero quantity and an info message. More... | |
GetMaximumLotsResult | Result (decimal quantity) |
Creates a new GetMaximumLotsResult for the specified quantity and no message. More... | |
Properties | |
SecurityPortfolioManager | Portfolio [get] |
Gets the algorithm's portfolio manager More... | |
IPositionGroup | PositionGroup [get] |
Gets the position group More... | |
decimal | TargetBuyingPower [get] |
The target buying power. More... | |
bool | SilenceNonErrorReasons [get] |
True enables the IBuyingPowerModel to skip setting GetMaximumLotsResult.Reason for non error situations, for performance More... | |
decimal | MinimumOrderMarginPortfolioPercentage [get] |
Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes More... | |
Defines the parameters for IPositionGroupBuyingPowerModel.GetMaximumLotsForTargetBuyingPower
Definition at line 21 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
QuantConnect.Securities.Positions.GetMaximumLotsForTargetBuyingPowerParameters.GetMaximumLotsForTargetBuyingPowerParameters | ( | SecurityPortfolioManager | portfolio, |
IPositionGroup | positionGroup, | ||
decimal | targetBuyingPower, | ||
decimal | minimumOrderMarginPortfolioPercentage, | ||
bool | silenceNonErrorReasons = false |
||
) |
Initializes a new instance of the GetMaximumLotsForTargetBuyingPowerParameters class
portfolio | The algorithm's portfolio manager |
positionGroup | The position group |
targetBuyingPower | The target buying power |
minimumOrderMarginPortfolioPercentage | Configurable minimum order margin portfolio percentage to ignore orders with unrealistic small sizes |
silenceNonErrorReasons | True will not return GetMaximumLotsResult.Reason set for non error situation, this is for performance |
Definition at line 60 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForTargetBuyingPowerParameters.Error | ( | string | reason | ) |
Creates a new GetMaximumLotsResult with zero quantity and an error message.
Definition at line 78 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForTargetBuyingPowerParameters.Zero | ( | ) |
Creates a new GetMaximumLotsResult with zero quantity and no message.
Definition at line 86 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForTargetBuyingPowerParameters.Zero | ( | string | reason | ) |
Creates a new GetMaximumLotsResult with zero quantity and an info message.
Definition at line 94 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForTargetBuyingPowerParameters.Result | ( | decimal | quantity | ) |
Creates a new GetMaximumLotsResult for the specified quantity and no message.
Definition at line 102 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
|
get |
Gets the algorithm's portfolio manager
Definition at line 26 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
|
get |
Gets the position group
Definition at line 31 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
|
get |
The target buying power.
Sign defines the position side, positive long, negative short side.
Definition at line 37 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
|
get |
True enables the IBuyingPowerModel to skip setting GetMaximumLotsResult.Reason for non error situations, for performance
Definition at line 43 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.
|
get |
Configurable minimum order margin portfolio percentage to ignore bad orders, orders with unrealistic small sizes
Default value is 0. This setting is useful to avoid small trading noise when using SetHoldings
Definition at line 49 of file GetMaximumLotsForTargetBuyingPowerParameters.cs.