Lean  $LEAN_TAG$
QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch Struct Reference

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...

Inheritance diagram for QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch:
[legend]

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ OptionStrategyLegDefinitionMatch()

QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.OptionStrategyLegDefinitionMatch ( int  multiplier,
OptionPosition  position 
)

Initializes a new instance of the OptionStrategyLegDefinitionMatch struct

Parameters
multiplierThe number of times the positions matched the leg definition
positionThe position that matched the leg definition

Definition at line 46 of file OptionStrategyLegDefinitionMatch.cs.

Member Function Documentation

◆ CreateOptionStrategyLeg()

OptionStrategy.LegData QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.CreateOptionStrategyLeg ( int  multiplier)

Creates the appropriate type of OptionStrategy.LegData for this matched position

Parameters
multiplierThe 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.

Here is the call graph for this function:

◆ CreateOptionPosition()

OptionPosition QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.CreateOptionPosition ( int  multiplier)

Creates the appropriate OptionPosition for this matched position

Parameters
multiplierThe 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.

◆ Equals() [1/2]

bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.Equals ( OptionStrategyLegDefinitionMatch  other)

Indicates whether the current object is equal to another object of the same type.

Parameters
otherAn object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.

Definition at line 107 of file OptionStrategyLegDefinitionMatch.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Equals() [2/2]

override bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.Equals ( object  obj)

Indicates whether this instance and a specified object are equal.

Parameters
objThe object to compare with the current instance.
Returns
true if obj and this instance are the same type and represent the same value; otherwise, false.

Definition at line 115 of file OptionStrategyLegDefinitionMatch.cs.

Here is the call graph for this function:

◆ GetHashCode()

override int QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer that is the hash code for this instance.

Definition at line 127 of file OptionStrategyLegDefinitionMatch.cs.

Here is the call graph for this function:

◆ ToString()

override string QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.ToString ( )

Returns the fully qualified type name of this instance.

Returns
The fully qualified type name.

Definition at line 137 of file OptionStrategyLegDefinitionMatch.cs.

◆ operator==()

static bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.operator== ( OptionStrategyLegDefinitionMatch  left,
OptionStrategyLegDefinitionMatch  right 
)
static

OptionStrategyLegDefinitionMatch == Operator

Returns
True if they are equal

Definition at line 146 of file OptionStrategyLegDefinitionMatch.cs.

Here is the call graph for this function:

◆ operator!=()

static bool QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.operator!= ( OptionStrategyLegDefinitionMatch  left,
OptionStrategyLegDefinitionMatch  right 
)
static

OptionStrategyLegDefinitionMatch != Operator

Returns
True if they are not equal

Definition at line 155 of file OptionStrategyLegDefinitionMatch.cs.

Here is the call graph for this function:

Property Documentation

◆ Multiplier

int QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.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.

Definition at line 31 of file OptionStrategyLegDefinitionMatch.cs.

◆ Position

OptionPosition QuantConnect.Securities.Option.StrategyMatcher.OptionStrategyLegDefinitionMatch.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.

Definition at line 39 of file OptionStrategyLegDefinitionMatch.cs.


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