Lean  $LEAN_TAG$
QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters Class Reference

Defines the parameters for IPositionGroupBuyingPowerModel.GetMaximumLotsForDeltaBuyingPower More...

Public Member Functions

 GetMaximumLotsForDeltaBuyingPowerParameters (SecurityPortfolioManager portfolio, IPositionGroup positionGroup, decimal deltaBuyingPower, decimal minimumOrderMarginPortfolioPercentage, bool silenceNonErrorReasons=false)
 Initializes a new instance of the GetMaximumLotsForDeltaBuyingPowerParameters 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 DeltaBuyingPower [get]
 The delta 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...
 

Detailed Description

Constructor & Destructor Documentation

◆ GetMaximumLotsForDeltaBuyingPowerParameters()

QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.GetMaximumLotsForDeltaBuyingPowerParameters ( SecurityPortfolioManager  portfolio,
IPositionGroup  positionGroup,
decimal  deltaBuyingPower,
decimal  minimumOrderMarginPortfolioPercentage,
bool  silenceNonErrorReasons = false 
)

Initializes a new instance of the GetMaximumLotsForDeltaBuyingPowerParameters class

Parameters
portfolioThe algorithm's portfolio manager
positionGroupThe position group
deltaBuyingPowerThe delta buying power to apply. Sign defines the position side to apply the delta
minimumOrderMarginPortfolioPercentageConfigurable minimum order margin portfolio percentage to ignore orders with unrealistic small sizes
silenceNonErrorReasonsTrue will not return GetMaximumLotsResult.Reason set for non error situation, this is for performance

Definition at line 60 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

Member Function Documentation

◆ Error()

GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.Error ( string  reason)

Creates a new GetMaximumLotsResult with zero quantity and an error message.

Definition at line 78 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

Here is the caller graph for this function:

◆ Zero() [1/2]

GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.Zero ( )

Creates a new GetMaximumLotsResult with zero quantity and no message.

Definition at line 86 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ Zero() [2/2]

GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.Zero ( string  reason)

Creates a new GetMaximumLotsResult with zero quantity and an info message.

Definition at line 94 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ Result()

GetMaximumLotsResult QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.Result ( decimal  quantity)

Creates a new GetMaximumLotsResult for the specified quantity and no message.

Definition at line 102 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

Property Documentation

◆ Portfolio

SecurityPortfolioManager QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.Portfolio
get

Gets the algorithm's portfolio manager

Definition at line 26 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ PositionGroup

IPositionGroup QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.PositionGroup
get

Gets the position group

Definition at line 31 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ DeltaBuyingPower

decimal QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.DeltaBuyingPower
get

The delta buying power.

Sign defines the position side to apply the delta, positive long, negative short side.

Definition at line 37 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ SilenceNonErrorReasons

bool QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.SilenceNonErrorReasons
get

True enables the IBuyingPowerModel to skip setting GetMaximumLotsResult.Reason for non error situations, for performance

Definition at line 43 of file GetMaximumLotsForDeltaBuyingPowerParameters.cs.

◆ MinimumOrderMarginPortfolioPercentage

decimal QuantConnect.Securities.Positions.GetMaximumLotsForDeltaBuyingPowerParameters.MinimumOrderMarginPortfolioPercentage
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 GetMaximumLotsForDeltaBuyingPowerParameters.cs.


The documentation for this class was generated from the following file: