Provides methods for creating common scheduled events
More...
|
static ScheduledEvent | EveryDayAt (string name, IEnumerable< DateTime > dates, TimeSpan timeOfDay, Action< string, DateTime > callback, DateTime? currentUtcTime=null) |
| Creates a new ScheduledEvent that will fire at the specified timeOfDay for every day in dates More...
|
|
static ScheduledEvent | EveryAlgorithmEndOfDay (IAlgorithm algorithm, IResultHandler resultHandler, DateTime start, DateTime end, TimeSpan endOfDayDelta, DateTime? currentUtcTime=null) |
| Creates a new ScheduledEvent that will fire before market close by the specified time More...
|
|
static ScheduledEvent | EverySecurityEndOfDay (IAlgorithm algorithm, IResultHandler resultHandler, Security security, DateTime start, DateTime end, TimeSpan endOfDayDelta, DateTime? currentUtcTime=null) |
| Creates a new ScheduledEvent that will fire before market close by the specified time More...
|
|
static string | CreateEventName (string scope, string name) |
| Defines the format of event names generated by this system. More...
|
|
Provides methods for creating common scheduled events
Definition at line 31 of file ScheduledEventFactory.cs.
◆ EveryDayAt()
static ScheduledEvent QuantConnect.Lean.Engine.RealTime.ScheduledEventFactory.EveryDayAt |
( |
string |
name, |
|
|
IEnumerable< DateTime > |
dates, |
|
|
TimeSpan |
timeOfDay, |
|
|
Action< string, DateTime > |
callback, |
|
|
DateTime? |
currentUtcTime = null |
|
) |
| |
|
static |
Creates a new ScheduledEvent that will fire at the specified timeOfDay for every day in dates
- Parameters
-
name | An identifier for this event |
dates | The dates to set events for at the specified time. These act as a base time to which the timeOfDay is added to, that is, the implementation does not use .Date before the addition |
timeOfDay | The time each tradeable date to fire the event |
callback | The delegate to call when an event fires |
currentUtcTime | Specfies the current time in UTC, before which, no events will be scheduled. Specify null to skip this filter. |
- Returns
- A new ScheduledEvent instance that fires events each tradeable day from the start to the finish at the specified time
Definition at line 45 of file ScheduledEventFactory.cs.
◆ EveryAlgorithmEndOfDay()
static ScheduledEvent QuantConnect.Lean.Engine.RealTime.ScheduledEventFactory.EveryAlgorithmEndOfDay |
( |
IAlgorithm |
algorithm, |
|
|
IResultHandler |
resultHandler, |
|
|
DateTime |
start, |
|
|
DateTime |
end, |
|
|
TimeSpan |
endOfDayDelta, |
|
|
DateTime? |
currentUtcTime = null |
|
) |
| |
|
static |
Creates a new ScheduledEvent that will fire before market close by the specified time
- Parameters
-
algorithm | The algorithm instance the event is fo |
resultHandler | The result handler, used to communicate run time errors |
start | The date to start the events |
end | The date to end the events |
endOfDayDelta | The time difference between the market close and the event, positive time will fire before market close |
currentUtcTime | Specfies the current time in UTC, before which, no events will be scheduled. Specify null to skip this filter. |
- Returns
- The new ScheduledEvent that will fire near market close each tradeable dat
Definition at line 66 of file ScheduledEventFactory.cs.
◆ EverySecurityEndOfDay()
static ScheduledEvent QuantConnect.Lean.Engine.RealTime.ScheduledEventFactory.EverySecurityEndOfDay |
( |
IAlgorithm |
algorithm, |
|
|
IResultHandler |
resultHandler, |
|
|
Security |
security, |
|
|
DateTime |
start, |
|
|
DateTime |
end, |
|
|
TimeSpan |
endOfDayDelta, |
|
|
DateTime? |
currentUtcTime = null |
|
) |
| |
|
static |
Creates a new ScheduledEvent that will fire before market close by the specified time
- Parameters
-
algorithm | The algorithm instance the event is fo |
resultHandler | The result handler, used to communicate run time errors |
security | The security used for defining tradeable dates |
start | The first date for the events |
end | The date to end the events |
endOfDayDelta | The time difference between the market close and the event, positive time will fire before market close |
currentUtcTime | Specfies the current time in UTC, before which, no events will be scheduled. Specify null to skip this filter. |
- Returns
- The new ScheduledEvent that will fire near market close each tradeable dat
Definition at line 116 of file ScheduledEventFactory.cs.
◆ CreateEventName()
static string QuantConnect.Lean.Engine.RealTime.ScheduledEventFactory.CreateEventName |
( |
string |
scope, |
|
|
string |
name |
|
) |
| |
|
static |
Defines the format of event names generated by this system.
- Parameters
-
scope | The scope of the event, example, 'Algorithm' or 'Security' |
name | A name for this specified event in this scope, example, 'EndOfDay' |
- Returns
- A string representing a fully scoped event name
Definition at line 162 of file ScheduledEventFactory.cs.
The documentation for this class was generated from the following file: