Lean
$LEAN_TAG$
|
Defines the item result type of OptionStrategyLegDefinition.Match, containing the number of times the leg definition matched the position (Multiplier) and applicable portion of the position. More...
Public Member Functions | |
OptionStrategyLegDefinitionMatch (int multiplier, OptionPosition position) | |
Initializes a new instance of the OptionStrategyLegDefinitionMatch struct More... | |
OptionStrategy.LegData | CreateOptionStrategyLeg (int multiplier) |
Creates the appropriate type of OptionStrategy.LegData for this matched position More... | |
OptionPosition | CreateOptionPosition (int multiplier) |
Creates the appropriate OptionPosition for this matched position More... | |
bool | Equals (OptionStrategyLegDefinitionMatch other) |
Indicates whether the current object is equal to another object of the same type. More... | |
override bool | Equals (object obj) |
Indicates whether this instance and a specified object are equal. More... | |
override int | GetHashCode () |
Returns the hash code for this instance. More... | |
override string | ToString () |
Returns the fully qualified type name of this instance. More... | |
Static Public Member Functions | |
static bool | operator== (OptionStrategyLegDefinitionMatch left, OptionStrategyLegDefinitionMatch right) |
OptionStrategyLegDefinitionMatch == Operator More... | |
static bool | operator!= (OptionStrategyLegDefinitionMatch left, OptionStrategyLegDefinitionMatch right) |
OptionStrategyLegDefinitionMatch != Operator More... | |
Properties | |
int | Multiplier [get] |
The number of times the definition is able to match the position. For example, if the definition requires +2 contracts and the algorithm's position has +5 contracts, then this multiplier would equal 2. More... | |
OptionPosition | Position [get] |
The position that was successfully matched with the total quantity matched. For example, if the definition requires +2 contracts and this multiplier equals 2, then this position would have a quantity of 4. This may be different than the remaining/total quantity available in the positions collection. More... | |
Defines the item result type of OptionStrategyLegDefinition.Match, containing the number of times the leg definition matched the position (Multiplier) and applicable portion of the position.
Definition at line 24 of file OptionStrategyLegDefinitionMatch.cs.
QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.OptionStrategyLegDefinitionMatch | ( | int | multiplier, |
OptionPosition | position | ||
) |
Initializes a new instance of the OptionStrategyLegDefinitionMatch struct
multiplier | The number of times the positions matched the leg definition |
position | The position that matched the leg definition |
Definition at line 46 of file OptionStrategyLegDefinitionMatch.cs.
OptionStrategy.LegData QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.CreateOptionStrategyLeg | ( | int | multiplier | ) |
Creates the appropriate type of OptionStrategy.LegData for this matched position
multiplier | The multiplier to use for creating the leg data. This multiplier will be the minimum multiplier of all legs within a strategy definition match. Each leg defines its own multiplier which is the max matches for that leg and the strategy definition's multiplier is the min of the individual legs. |
Definition at line 59 of file OptionStrategyLegDefinitionMatch.cs.
OptionPosition QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.CreateOptionPosition | ( | int | multiplier | ) |
Creates the appropriate OptionPosition for this matched position
multiplier | The multiplier to use for creating the OptionPosition. This multiplier will be the minimum multiplier of all legs within a strategy definition match. Each leg defines its own multiplier which is the max matches for that leg and the strategy definition's multiplier is the min of the individual legs. |
Definition at line 86 of file OptionStrategyLegDefinitionMatch.cs.
bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.Equals | ( | OptionStrategyLegDefinitionMatch | 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 107 of file OptionStrategyLegDefinitionMatch.cs.
override bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.Equals | ( | object | obj | ) |
Indicates whether this instance and a specified object are equal.
obj | The object to compare with the current instance. |
Definition at line 115 of file OptionStrategyLegDefinitionMatch.cs.
override int QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.GetHashCode | ( | ) |
Returns the hash code for this instance.
Definition at line 127 of file OptionStrategyLegDefinitionMatch.cs.
override string QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.ToString | ( | ) |
Returns the fully qualified type name of this instance.
Definition at line 137 of file OptionStrategyLegDefinitionMatch.cs.
|
static |
OptionStrategyLegDefinitionMatch == Operator
Definition at line 146 of file OptionStrategyLegDefinitionMatch.cs.
|
static |
OptionStrategyLegDefinitionMatch != Operator
Definition at line 155 of file OptionStrategyLegDefinitionMatch.cs.
|
get |
The number of times the definition is able to match the position. For example, if the definition requires +2 contracts and the algorithm's position has +5 contracts, then this multiplier would equal 2.
Definition at line 31 of file OptionStrategyLegDefinitionMatch.cs.
|
get |
The position that was successfully matched with the total quantity matched. For example, if the definition requires +2 contracts and this multiplier equals 2, then this position would have a quantity of 4. This may be different than the remaining/total quantity available in the positions collection.
Definition at line 39 of file OptionStrategyLegDefinitionMatch.cs.