Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.DataFeeds.PredicateTimeProvider Class Reference

Will generate time steps around the desired ITimeProvider Provided step evaluator should return true when the next time step is valid and time can advance More...

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

Public Member Functions

 PredicateTimeProvider (ITimeProvider underlyingTimeProvider, Func< DateTime, bool > customStepEvaluator)
 Creates a new instance More...
 
DateTime GetUtcNow ()
 Gets the current utc time step More...
 

Detailed Description

Will generate time steps around the desired ITimeProvider Provided step evaluator should return true when the next time step is valid and time can advance

Definition at line 26 of file PredicateTimeProvider.cs.

Constructor & Destructor Documentation

◆ PredicateTimeProvider()

QuantConnect.Lean.Engine.DataFeeds.PredicateTimeProvider.PredicateTimeProvider ( ITimeProvider  underlyingTimeProvider,
Func< DateTime, bool >  customStepEvaluator 
)

Creates a new instance

Parameters
underlyingTimeProviderThe timer provider instance to wrap
customStepEvaluatorFunction to evaluate whether or not to advance time. Should return true if provided DateTime is a valid new next time. False will avoid time advancing

Definition at line 39 of file PredicateTimeProvider.cs.

Member Function Documentation

◆ GetUtcNow()

DateTime QuantConnect.Lean.Engine.DataFeeds.PredicateTimeProvider.GetUtcNow ( )

Gets the current utc time step

Implements QuantConnect.ITimeProvider.

Definition at line 49 of file PredicateTimeProvider.cs.


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