Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator Class Reference

The FillForwardEnumerator wraps an existing base data enumerator and inserts extra 'base data' instances on a specified fill forward resolution More...

Inheritance diagram for QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator:
[legend]

Public Member Functions

 FillForwardEnumerator (IEnumerator< BaseData > enumerator, SecurityExchange exchange, IReadOnlyRef< TimeSpan > fillForwardResolution, bool isExtendedMarketHours, DateTime subscriptionEndTime, TimeSpan dataResolution, DateTimeZone dataTimeZone)
 Initializes a new instance of the FillForwardEnumerator class that accepts a reference to the fill forward resolution, useful if the fill forward resolution is dynamic and changing as the enumeration progresses More...
 
bool MoveNext ()
 Advances the enumerator to the next element of the collection. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Reset ()
 Sets the enumerator to its initial position, which is before the first element in the collection. More...
 

Protected Member Functions

virtual bool RequiresFillForwardData (TimeSpan fillForwardResolution, BaseData previous, BaseData next, out BaseData fillForward)
 Determines whether or not fill forward is required, and if true, will produce the new fill forward data More...
 

Protected Attributes

readonly SecurityExchange Exchange
 The exchange used to determine when to insert fill forward data More...
 

Properties

BaseData Current [get]
 Gets the element in the collection at the current position of the enumerator. More...
 

Detailed Description

The FillForwardEnumerator wraps an existing base data enumerator and inserts extra 'base data' instances on a specified fill forward resolution

Definition at line 35 of file FillForwardEnumerator.cs.

Constructor & Destructor Documentation

◆ FillForwardEnumerator()

QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.FillForwardEnumerator ( IEnumerator< BaseData enumerator,
SecurityExchange  exchange,
IReadOnlyRef< TimeSpan >  fillForwardResolution,
bool  isExtendedMarketHours,
DateTime  subscriptionEndTime,
TimeSpan  dataResolution,
DateTimeZone  dataTimeZone 
)

Initializes a new instance of the FillForwardEnumerator class that accepts a reference to the fill forward resolution, useful if the fill forward resolution is dynamic and changing as the enumeration progresses

Parameters
enumeratorThe source enumerator to be filled forward
exchangeThe exchange used to determine when to insert fill forward data
fillForwardResolutionThe resolution we'd like to receive data on
isExtendedMarketHoursTrue to use the exchange's extended market hours, false to use the regular market hours
subscriptionEndTimeThe end time of the subscrition, once passing this date the enumerator will stop
dataResolutionThe source enumerator's data resolution
dataTimeZoneThe time zone of the underlying source data. This is used for rounding calculations and is NOT the time zone on the BaseData instances (unless of course data time zone equals the exchange time zone)

Definition at line 68 of file FillForwardEnumerator.cs.

Member Function Documentation

◆ MoveNext()

bool QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.MoveNext ( )

Advances the enumerator to the next element of the collection.

Returns
true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
Exceptions
T:System.InvalidOperationExceptionThe collection was modified after the enumerator was created.

<filterpriority>2</filterpriority>

Definition at line 116 of file FillForwardEnumerator.cs.

Here is the call graph for this function:

◆ Dispose()

void QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

<filterpriority>2</filterpriority>

Definition at line 225 of file FillForwardEnumerator.cs.

◆ Reset()

void QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.Reset ( )

Sets the enumerator to its initial position, which is before the first element in the collection.

Exceptions
T:System.InvalidOperationExceptionThe collection was modified after the enumerator was created.

<filterpriority>2</filterpriority>

Definition at line 234 of file FillForwardEnumerator.cs.

◆ RequiresFillForwardData()

virtual bool QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.RequiresFillForwardData ( TimeSpan  fillForwardResolution,
BaseData  previous,
BaseData  next,
out BaseData  fillForward 
)
protectedvirtual

Determines whether or not fill forward is required, and if true, will produce the new fill forward data

Parameters
fillForwardResolution
previousThe last piece of data emitted by this enumerator
nextThe next piece of data on the source enumerator
fillForwardWhen this function returns true, this will have a non-null value, null when the function returns false
Returns
True when a new fill forward piece of data was produced and should be emitted by this enumerator

Reimplemented in QuantConnect.Lean.Engine.DataFeeds.Enumerators.LiveFillForwardEnumerator.

Definition at line 247 of file FillForwardEnumerator.cs.

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

Member Data Documentation

◆ Exchange

readonly SecurityExchange QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.Exchange
protected

The exchange used to determine when to insert fill forward data

Definition at line 53 of file FillForwardEnumerator.cs.

Property Documentation

◆ Current

BaseData QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.Current
get

Gets the element in the collection at the current position of the enumerator.

Returns
The element in the collection at the current position of the enumerator.

Definition at line 95 of file FillForwardEnumerator.cs.


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