Lean  $LEAN_TAG$
QuantConnect.Scheduling.ScheduledEvent Class Reference

Real time self scheduling event More...

Inheritance diagram for QuantConnect.Scheduling.ScheduledEvent:
[legend]

Public Member Functions

 ScheduledEvent (string name, DateTime eventUtcTime, Action< string, DateTime > callback=null)
 Initializes a new instance of the ScheduledEvent class More...
 
 ScheduledEvent (string name, IEnumerable< DateTime > orderedEventUtcTimes, Action< string, DateTime > callback=null)
 Initializes a new instance of the ScheduledEvent class More...
 
 ScheduledEvent (string name, IEnumerator< DateTime > orderedEventUtcTimes, Action< string, DateTime > callback=null)
 Initializes a new instance of the ScheduledEvent class More...
 
override int GetHashCode ()
 Serves as the default hash function. More...
 
override bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
override string ToString ()
 Will return the ScheduledEvents name More...
 

Static Public Attributes

static readonly TimeSpan SecurityEndOfDayDelta = TimeSpan.FromMinutes(10)
 Gets the default time before market close end of trading day events will fire More...
 
static readonly TimeSpan AlgorithmEndOfDayDelta = TimeSpan.FromMinutes(2)
 Gets the default time before midnight end of day events will fire More...
 

Protected Member Functions

void OnEventFired (DateTime triggerTime)
 Event invocator for the EventFired event More...
 

Properties

bool Enabled [get, set]
 Gets or sets whether this event is enabled More...
 
DateTime NextEventUtcTime [get]
 Gets the next time this scheduled event will fire in UTC More...
 
string Name [get]
 Gets an identifier for this event More...
 

Events

Action< string, DateTime > EventFired
 Event that fires each time this scheduled event happens More...
 

Detailed Description

Real time self scheduling event

Definition at line 27 of file ScheduledEvent.cs.

Constructor & Destructor Documentation

◆ ScheduledEvent() [1/3]

QuantConnect.Scheduling.ScheduledEvent.ScheduledEvent ( string  name,
DateTime  eventUtcTime,
Action< string, DateTime >  callback = null 
)

Initializes a new instance of the ScheduledEvent class

Parameters
nameAn identifier for this event
eventUtcTimeThe date time the event should fire
callbackDelegate to be called when the event time passes

Definition at line 98 of file ScheduledEvent.cs.

◆ ScheduledEvent() [2/3]

QuantConnect.Scheduling.ScheduledEvent.ScheduledEvent ( string  name,
IEnumerable< DateTime >  orderedEventUtcTimes,
Action< string, DateTime >  callback = null 
)

Initializes a new instance of the ScheduledEvent class

Parameters
nameAn identifier for this event
orderedEventUtcTimesAn enumerable that emits event times
callbackDelegate to be called each time an event passes

Definition at line 109 of file ScheduledEvent.cs.

◆ ScheduledEvent() [3/3]

QuantConnect.Scheduling.ScheduledEvent.ScheduledEvent ( string  name,
IEnumerator< DateTime >  orderedEventUtcTimes,
Action< string, DateTime >  callback = null 
)

Initializes a new instance of the ScheduledEvent class

Parameters
nameAn identifier for this event
orderedEventUtcTimesAn enumerator that emits event times
callbackDelegate to be called each time an event passes

Definition at line 120 of file ScheduledEvent.cs.

Member Function Documentation

◆ GetHashCode()

override int QuantConnect.Scheduling.ScheduledEvent.GetHashCode ( )

Serves as the default hash function.

Returns
A hash code for the current object.

<filterpriority>2</filterpriority>

Definition at line 134 of file ScheduledEvent.cs.

◆ Equals()

override bool QuantConnect.Scheduling.ScheduledEvent.Equals ( object  obj)

Determines whether the specified object is equal to the current object.

Returns
true if the specified object is equal to the current object; otherwise, false.
Parameters
objThe object to compare with the current object.

<filterpriority>2</filterpriority>

Definition at line 143 of file ScheduledEvent.cs.

◆ ToString()

override string QuantConnect.Scheduling.ScheduledEvent.ToString ( )

Will return the ScheduledEvents name

Definition at line 236 of file ScheduledEvent.cs.

◆ OnEventFired()

void QuantConnect.Scheduling.ScheduledEvent.OnEventFired ( DateTime  triggerTime)
protected

Event invocator for the EventFired event

Parameters
triggerTimeThe event's time in UTC

Definition at line 254 of file ScheduledEvent.cs.

Member Data Documentation

◆ SecurityEndOfDayDelta

readonly TimeSpan QuantConnect.Scheduling.ScheduledEvent.SecurityEndOfDayDelta = TimeSpan.FromMinutes(10)
static

Gets the default time before market close end of trading day events will fire

Definition at line 32 of file ScheduledEvent.cs.

◆ AlgorithmEndOfDayDelta

readonly TimeSpan QuantConnect.Scheduling.ScheduledEvent.AlgorithmEndOfDayDelta = TimeSpan.FromMinutes(2)
static

Gets the default time before midnight end of day events will fire

Definition at line 37 of file ScheduledEvent.cs.

Property Documentation

◆ Enabled

bool QuantConnect.Scheduling.ScheduledEvent.Enabled
getset

Gets or sets whether this event is enabled

Definition at line 53 of file ScheduledEvent.cs.

◆ NextEventUtcTime

DateTime QuantConnect.Scheduling.ScheduledEvent.NextEventUtcTime
get

Gets the next time this scheduled event will fire in UTC

Definition at line 69 of file ScheduledEvent.cs.

◆ Name

string QuantConnect.Scheduling.ScheduledEvent.Name
get

Gets an identifier for this event

Definition at line 90 of file ScheduledEvent.cs.

Event Documentation

◆ EventFired

Action<string, DateTime> QuantConnect.Scheduling.ScheduledEvent.EventFired

Event that fires each time this scheduled event happens

Definition at line 47 of file ScheduledEvent.cs.


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