Lean
$LEAN_TAG$
|
An implementation of the FillForwardEnumerator that uses an ITimeProvider to determine if a fill forward bar needs to be emitted More...
Public Member Functions | |
LiveFillForwardEnumerator (ITimeProvider timeProvider, IEnumerator< BaseData > enumerator, SecurityExchange exchange, IReadOnlyRef< TimeSpan > fillForwardResolution, bool isExtendedMarketHours, DateTime subscriptionEndTime, Resolution dataResolution, DateTimeZone dataTimeZone, bool dailyStrictEndTimeEnabled, Type dataType=null) | |
Initializes a new instance of the LiveFillForwardEnumerator 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... | |
![]() | |
FillForwardEnumerator (IEnumerator< BaseData > enumerator, SecurityExchange exchange, IReadOnlyRef< TimeSpan > fillForwardResolution, bool isExtendedMarketHours, DateTime subscriptionEndTime, TimeSpan dataResolution, DateTimeZone dataTimeZone, bool dailyStrictEndTimeEnabled, Type dataType=null) | |
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... | |
Static Public Member Functions | |
static TimeSpan | GetMaximumDataTimeout (Resolution resolution) |
Helper method to know how much we should wait before fill forwarding a bar in live trading More... | |
Protected Member Functions | |
override 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... | |
Additional Inherited Members | |
![]() | |
SecurityExchange | Exchange [get] |
The exchange used to determine when to insert fill forward data More... | |
BaseData | Current [get] |
Gets the element in the collection at the current position of the enumerator. More... | |
An implementation of the FillForwardEnumerator that uses an ITimeProvider to determine if a fill forward bar needs to be emitted
Definition at line 30 of file LiveFillForwardEnumerator.cs.
QuantConnect.Lean.Engine.DataFeeds.Enumerators.LiveFillForwardEnumerator.LiveFillForwardEnumerator | ( | ITimeProvider | timeProvider, |
IEnumerator< BaseData > | enumerator, | ||
SecurityExchange | exchange, | ||
IReadOnlyRef< TimeSpan > | fillForwardResolution, | ||
bool | isExtendedMarketHours, | ||
DateTime | subscriptionEndTime, | ||
Resolution | dataResolution, | ||
DateTimeZone | dataTimeZone, | ||
bool | dailyStrictEndTimeEnabled, | ||
Type | dataType = null |
||
) |
Initializes a new instance of the LiveFillForwardEnumerator class that accepts a reference to the fill forward resolution, useful if the fill forward resolution is dynamic and changing as the enumeration progresses
timeProvider | The source of time used to gauage when this enumerator should emit extra bars when null data is returned from the source enumerator |
enumerator | The source enumerator to be filled forward |
exchange | The exchange used to determine when to insert fill forward data |
fillForwardResolution | The resolution we'd like to receive data on |
isExtendedMarketHours | True to use the exchange's extended market hours, false to use the regular market hours |
subscriptionEndTime | The end time of the subscription, once passing this date the enumerator will stop |
dataResolution | The source enumerator's data resolution |
dataTimeZone | Time zone of the underlying source data |
dailyStrictEndTimeEnabled | True if daily strict end times are enabled |
dataType | The configuration data type this enumerator is for |
Definition at line 52 of file LiveFillForwardEnumerator.cs.
|
protectedvirtual |
Determines whether or not fill forward is required, and if true, will produce the new fill forward data
fillForwardResolution | |
previous | The last piece of data emitted by this enumerator |
next | The next piece of data on the source enumerator, this may be null |
fillForward | When this function returns true, this will have a non-null value, null when the function returns false |
Reimplemented from QuantConnect.Lean.Engine.DataFeeds.Enumerators.FillForwardEnumerator.
Definition at line 71 of file LiveFillForwardEnumerator.cs.
|
static |
Helper method to know how much we should wait before fill forwarding a bar in live trading
This allows us to create bars taking into account the market auction close and open official prices. Also it will allow data providers which might have some delay on creating the bars on their end, to be consumed correctly, when available, by Lean
Definition at line 98 of file LiveFillForwardEnumerator.cs.