Lean
$LEAN_TAG$
|
Defines a quantity of a security's holdings for inclusion in a position group More...
Public Member Functions | |
Position (Symbol symbol, decimal quantity, decimal unitQuantity) | |
Initializes a new instance of the Position class More... | |
Position (Security security, decimal? quantity=null) | |
Initializes a new instance of the Position class using the security's lot size as it's unit quantity. If quantity is null, then the security's holdings quantity is used. More... | |
override string | ToString () |
Returns a string that represents the current object. More... | |
Properties | |
Symbol | Symbol [get] |
The symbol More... | |
decimal | Quantity [get] |
The quantity More... | |
decimal | UnitQuantity [get] |
The unit quantity. The unit quantities of a group define the group. For example, a covered call has 100 units of stock and -1 units of call contracts. More... | |
Properties inherited from QuantConnect.Securities.Positions.IPosition | |
Symbol | Symbol [get] |
The symbol More... | |
decimal | Quantity [get] |
The quantity More... | |
decimal | UnitQuantity [get] |
The unit quantity. The unit quantities of a group define the group. For example, a covered call has 100 units of stock and -1 units of call contracts. More... | |
Defines a quantity of a security's holdings for inclusion in a position group
Definition at line 21 of file Position.cs.
QuantConnect.Securities.Positions.Position.Position | ( | Symbol | symbol, |
decimal | quantity, | ||
decimal | unitQuantity | ||
) |
Initializes a new instance of the Position class
symbol | The symbol |
quantity | The quantity |
unitQuantity | The position's unit quantity within its group |
Definition at line 45 of file Position.cs.
QuantConnect.Securities.Positions.Position.Position | ( | Security | security, |
decimal? | quantity = null |
||
) |
Initializes a new instance of the Position class using the security's lot size as it's unit quantity. If quantity is null, then the security's holdings quantity is used.
security | The security |
quantity | The quantity, if null, the security's holdings quantity is used |
Definition at line 58 of file Position.cs.
override string QuantConnect.Securities.Positions.Position.ToString | ( | ) |
Returns a string that represents the current object.
Definition at line 65 of file Position.cs.
|
get |
The symbol
Definition at line 26 of file Position.cs.
|
get |
The quantity
Definition at line 31 of file Position.cs.
|
get |
The unit quantity. The unit quantities of a group define the group. For example, a covered call has 100 units of stock and -1 units of call contracts.
Definition at line 37 of file Position.cs.