Lean
$LEAN_TAG$
|
Provides extension methods to slices and slice enumerables More...
Static Public Member Functions | |
static IEnumerable< TradeBars > | TradeBars (this IEnumerable< Slice > slices) |
Selects into the slice and returns the TradeBars that have data in order More... | |
static IEnumerable< Ticks > | Ticks (this IEnumerable< Slice > slices) |
Selects into the slice and returns the Ticks that have data in order More... | |
static IEnumerable< DataDictionary< BaseDataCollection > > | GetUniverseData (this IEnumerable< Slice > slices) |
Gets the data dictionaries or points of the requested type in each slice More... | |
static IEnumerable< dynamic > | Get (this IEnumerable< Slice > slices, Type type, Symbol symbol=null) |
Gets the data dictionaries or points of the requested type in each slice More... | |
static IEnumerable< TradeBar > | Get (this IEnumerable< Slice > slices, Symbol symbol) |
Gets an enumerable of TradeBar for the given symbol. This method does not verify that the specified symbol points to a TradeBar More... | |
static IEnumerable< T > | Get< T > (this IEnumerable< DataDictionary< T >> dataDictionaries, Symbol symbol) |
Gets an enumerable of T for the given symbol. This method does not vify that the specified symbol points to a T More... | |
static IEnumerable< decimal > | Get< T > (this IEnumerable< DataDictionary< T >> dataDictionaries, Symbol symbol, string field) |
Gets an enumerable of decimals by accessing the specified field on data for the symbol More... | |
static IEnumerable< DataDictionary< T > > | Get< T > (this IEnumerable< Slice > slices) |
Gets the data dictionaries of the requested type in each slice More... | |
static IEnumerable< T > | Get< T > (this IEnumerable< Slice > slices, Symbol symbol) |
Gets an enumerable of T by accessing the slices for the requested symbol More... | |
static IEnumerable< decimal > | Get (this IEnumerable< Slice > slices, Symbol symbol, Func< BaseData, decimal > field) |
Gets an enumerable of decimal by accessing the slice for the symbol and then retrieving the specified field on each piece of data More... | |
static bool | TryGet< T > (this Slice slice, Symbol symbol, out T data) |
Tries to get the data for the specified symbol and type More... | |
static bool | TryGet (this Slice slice, Type type, Symbol symbol, out dynamic data) |
Tries to get the data for the specified symbol and type More... | |
static double[] | ToDoubleArray (this IEnumerable< decimal > decimals) |
Converts the specified enumerable of decimals into a double array More... | |
static void | PushThroughConsolidators (this IEnumerable< Slice > slices, Dictionary< Symbol, IDataConsolidator > consolidatorsBySymbol) |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects. More... | |
static void | PushThroughConsolidators (this IEnumerable< Slice > slices, Func< Symbol, IDataConsolidator > consolidatorsProvider) |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects. More... | |
static void | PushThrough (this IEnumerable< Slice > slices, Action< BaseData > handler, Type dataType=null) |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects. More... | |
Provides extension methods to slices and slice enumerables
Definition at line 31 of file SliceExtensions.cs.
|
static |
Selects into the slice and returns the TradeBars that have data in order
slices | The enumerable of slice |
Definition at line 38 of file SliceExtensions.cs.
|
static |
Selects into the slice and returns the Ticks that have data in order
slices | The enumerable of slice |
Definition at line 48 of file SliceExtensions.cs.
|
static |
Gets the data dictionaries or points of the requested type in each slice
slices | The enumerable of slice |
Definition at line 58 of file SliceExtensions.cs.
|
static |
Gets the data dictionaries or points of the requested type in each slice
slices | The enumerable of slice |
type | Data type of the data that will be fetched |
symbol | The symbol to retrieve |
Definition at line 74 of file SliceExtensions.cs.
|
static |
Gets an enumerable of TradeBar for the given symbol. This method does not verify that the specified symbol points to a TradeBar
slices | The enumerable of slice |
symbol | The symbol to retrieve |
Definition at line 93 of file SliceExtensions.cs.
|
static |
Gets an enumerable of T for the given symbol. This method does not vify that the specified symbol points to a T
T | The data type |
dataDictionaries | The data dictionary enumerable to access |
symbol | The symbol to retrieve |
T | : | IBaseData |
Definition at line 106 of file SliceExtensions.cs.
|
static |
Gets an enumerable of decimals by accessing the specified field on data for the symbol
T | The data type |
dataDictionaries | An enumerable of data dictionaries |
symbol | The symbol to retrieve |
field | The field to access |
Definition at line 120 of file SliceExtensions.cs.
|
static |
Gets the data dictionaries of the requested type in each slice
T | The data type |
slices | The enumerable of slice |
T | : | IBaseData |
Definition at line 159 of file SliceExtensions.cs.
|
static |
Gets an enumerable of T by accessing the slices for the requested symbol
T | The data type |
slices | The enumerable of slice |
symbol | The symbol to retrieve |
T | : | IBaseData |
Definition at line 172 of file SliceExtensions.cs.
|
static |
Gets an enumerable of decimal by accessing the slice for the symbol and then retrieving the specified field on each piece of data
slices | The enumerable of slice |
symbol | The symbol to retrieve |
field | The field selector used to access the dats |
Definition at line 186 of file SliceExtensions.cs.
|
static |
Tries to get the data for the specified symbol and type
T | The type of data we want, for example, TradeBar or UnlinkedData, etc... |
slice | The slice |
symbol | The symbol data is sought for |
data | The found data |
T | : | IBaseData |
Definition at line 207 of file SliceExtensions.cs.
|
static |
Tries to get the data for the specified symbol and type
slice | The slice |
type | The type of data we seek |
symbol | The symbol data is sought for |
data | The found data |
Definition at line 229 of file SliceExtensions.cs.
|
static |
Converts the specified enumerable of decimals into a double array
decimals | The enumerable of decimal |
Definition at line 247 of file SliceExtensions.cs.
|
static |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects.
slices | The data to send into the consolidators, likely result of a history request |
consolidatorsBySymbol | Dictionary of consolidators keyed by symbol |
Definition at line 258 of file SliceExtensions.cs.
|
static |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects.
slices | The data to send into the consolidators, likely result of a history request |
consolidatorsProvider | Delegate that fetches the consolidators by a symbol |
Definition at line 274 of file SliceExtensions.cs.
|
static |
Loops through the specified slices and pushes the data into the consolidators. This can be used to easily warm up indicators from a history call that returns slice objects.
slices | The data to send into the consolidators, likely result of a history request |
handler | Delegate handles each data piece from the slice |
dataType | Defines the type of the data that should be pushed |
Definition at line 286 of file SliceExtensions.cs.