|
Lean
$LEAN_TAG$
|
Defines a unique and deterministic key for IPositionGroup More...
Public Member Functions | |
| PositionGroupKey (IPositionGroupBuyingPowerModel buyingPowerModel, Security security) | |
| Initializes a new instance of the PositionGroupKey class for groups with a single security More... | |
| PositionGroupKey (IPositionGroupBuyingPowerModel buyingPowerModel, IReadOnlyCollection< IPosition > positions) | |
| Initializes a new instance of the PositionGroupKey class More... | |
| IPosition[] | CreateEmptyPositions () |
| Creates a new array of empty positions with unit quantities according to this key More... | |
| bool | Equals (PositionGroupKey other) |
| Indicates whether the current object is equal to another object of the same type. More... | |
| override bool | Equals (object obj) |
| Determines whether the specified object is equal to the current object. More... | |
| override int | GetHashCode () |
| Serves as the default hash function. More... | |
| override string | ToString () |
| Returns a string that represents the current object. More... | |
Static Public Member Functions | |
| static bool | operator== (PositionGroupKey left, PositionGroupKey right) |
| Equals operator More... | |
| static bool | operator!= (PositionGroupKey left, PositionGroupKey right) |
| Not equals operator More... | |
Properties | |
| bool | IsDefaultGroup [get] |
| Gets whether or not this key defines a default group More... | |
| IPositionGroupBuyingPowerModel | BuyingPowerModel [get] |
| Gets the IPositionGroupBuyingPowerModel being used by the group More... | |
| IReadOnlyList< Tuple< Symbol, decimal > > | UnitQuantities [get] |
| Gets the unit quantities defining the ratio between position quantities in the group More... | |
Defines a unique and deterministic key for IPositionGroup
Definition at line 25 of file PositionGroupKey.cs.
| QuantConnect.Securities.Positions.PositionGroupKey.PositionGroupKey | ( | IPositionGroupBuyingPowerModel | buyingPowerModel, |
| Security | security | ||
| ) |
Initializes a new instance of the PositionGroupKey class for groups with a single security
| buyingPowerModel | The group's buying power model |
| security | The security |
Definition at line 47 of file PositionGroupKey.cs.
| QuantConnect.Securities.Positions.PositionGroupKey.PositionGroupKey | ( | IPositionGroupBuyingPowerModel | buyingPowerModel, |
| IReadOnlyCollection< IPosition > | positions | ||
| ) |
Initializes a new instance of the PositionGroupKey class
| buyingPowerModel | The group's buying power model |
| positions | The positions comprising the group |
Definition at line 62 of file PositionGroupKey.cs.
| IPosition [] QuantConnect.Securities.Positions.PositionGroupKey.CreateEmptyPositions | ( | ) |
Creates a new array of empty positions with unit quantities according to this key
Definition at line 84 of file PositionGroupKey.cs.
| bool QuantConnect.Securities.Positions.PositionGroupKey.Equals | ( | PositionGroupKey | other | ) |
Indicates whether the current object is equal to another object of the same type.
| other | An object to compare with this object. |
Definition at line 98 of file PositionGroupKey.cs.
| override bool QuantConnect.Securities.Positions.PositionGroupKey.Equals | ( | object | obj | ) |
Determines whether the specified object is equal to the current object.
| obj | The object to compare with the current object. |
Definition at line 117 of file PositionGroupKey.cs.
| override int QuantConnect.Securities.Positions.PositionGroupKey.GetHashCode | ( | ) |
Serves as the default hash function.
Definition at line 134 of file PositionGroupKey.cs.
| override string QuantConnect.Securities.Positions.PositionGroupKey.ToString | ( | ) |
Returns a string that represents the current object.
Definition at line 144 of file PositionGroupKey.cs.
|
static |
Equals operator
Definition at line 152 of file PositionGroupKey.cs.
|
static |
Not equals operator
Definition at line 160 of file PositionGroupKey.cs.
|
get |
Gets whether or not this key defines a default group
Definition at line 30 of file PositionGroupKey.cs.
|
get |
Gets the IPositionGroupBuyingPowerModel being used by the group
Definition at line 35 of file PositionGroupKey.cs.
|
get |
Gets the unit quantities defining the ratio between position quantities in the group
Definition at line 40 of file PositionGroupKey.cs.