Lean
$LEAN_TAG$
|
This is a window that allows for list access semantics, where this[0] refers to the most recent item in the window and this[Count-1] refers to the last item in the window More...
Public Member Functions | |
RollingWindow (int size) | |
Initializes a new instance of the RollwingWindow class with the specified window size. More... | |
IEnumerator< T > | GetEnumerator () |
Returns an enumerator that iterates through the collection. More... | |
void | Add (T item) |
Adds an item to this window and shifts all other elements More... | |
void | Reset () |
Clears this window of all data More... | |
Properties | |
int | Size [get, set] |
Gets the size of this window More... | |
int | Count [get] |
Gets the current number of elements in this window More... | |
int | Samples [get] |
Gets the number of samples that have been added to this window over its lifetime More... | |
T | MostRecentlyRemoved [get] |
Gets the most recently removed item from the window. This is the piece of data that just 'fell off' as a result of the most recent add. If no items have been removed, this will throw an exception. More... | |
T | this[int i] [get, set] |
Indexes into this window, where index 0 is the most recently entered value More... | |
bool | IsReady [get] |
Gets a value indicating whether or not this window is ready, i.e, it has been filled to its capacity More... | |
Properties inherited from QuantConnect.Indicators.IReadOnlyWindow< T > | |
int | Size [get] |
Gets the size of this window More... | |
int | Count [get] |
Gets the current number of elements in this window More... | |
int | Samples [get] |
Gets the number of samples that have been added to this window over its lifetime More... | |
T | this[int i] [get] |
Indexes into this window, where index 0 is the most recently entered value More... | |
bool | IsReady [get] |
Gets a value indicating whether or not this window is ready, i.e, it has been filled to its capacity, this is when the Size==Count More... | |
T | MostRecentlyRemoved [get] |
Gets the most recently removed item from the window. This is the piece of data that just 'fell off' as a result of the most recent add. If no items have been removed, this will throw an exception. More... | |
This is a window that allows for list access semantics, where this[0] refers to the most recent item in the window and this[Count-1] refers to the last item in the window
T | The type of data in the window |
Definition at line 29 of file RollingWindow.cs.
QuantConnect.Indicators.RollingWindow< T >.RollingWindow | ( | int | size | ) |
Initializes a new instance of the RollwingWindow class with the specified window size.
size | The number of items to hold in the window |
Definition at line 48 of file RollingWindow.cs.
IEnumerator<T> QuantConnect.Indicators.RollingWindow< T >.GetEnumerator | ( | ) |
Returns an enumerator that iterates through the collection.
<filterpriority>1</filterpriority>
Definition at line 245 of file RollingWindow.cs.
void QuantConnect.Indicators.RollingWindow< T >.Add | ( | T | item | ) |
Adds an item to this window and shifts all other elements
item | The item to be added |
Definition at line 283 of file RollingWindow.cs.
void QuantConnect.Indicators.RollingWindow< T >.Reset | ( | ) |
Clears this window of all data
Definition at line 312 of file RollingWindow.cs.
|
getset |
Gets the size of this window
Definition at line 62 of file RollingWindow.cs.
|
get |
Gets the current number of elements in this window
Definition at line 85 of file RollingWindow.cs.
|
get |
Gets the number of samples that have been added to this window over its lifetime
Definition at line 104 of file RollingWindow.cs.
|
get |
Gets the most recently removed item from the window. This is the piece of data that just 'fell off' as a result of the most recent add. If no items have been removed, this will throw an exception.
Definition at line 125 of file RollingWindow.cs.
|
getset |
Indexes into this window, where index 0 is the most recently entered value
i | the index, i |
Definition at line 153 of file RollingWindow.cs.
|
get |
Gets a value indicating whether or not this window is ready, i.e, it has been filled to its capacity
Definition at line 223 of file RollingWindow.cs.