Timer (Component Class)

Defines the structure for an object that executes an event method when a time interval elapses.

Namespace: elsystem

Properties
  Name Type Description
Public property AutoReset bool True if the timer event should fire multiple times until stopped, or False for once.
Public property Enable bool True to turn on the timer, or False to turn off and reset.
Public property Interval int Sets the time interval in milliseconds.
Methods
  Name Description
Public property Create Initializes a new instance of the class.
Public property Start Starts the timer.
Public property Stop Stops the timer.
Events
  Name Description
 Public event Elapsed Occurs whenever the Timer object expires. See TimerElapsedEventArgs for the properties returned by the handler's args parameter.
Example

The following example uses a Timer to display the time, updated every second.  

Import Example Timer indicator for Chart Analysis or RadarScreen
  1. Click on the Import Example link to import the example into TradeStation.   
  2. Go to the TradeStation platform and create a Chart Analysis or RadarScreen window.  Use the Insert - Indicator menu sequence and Add !ex_Timer to the window.
  3. To review or modify the example code, go to the TS Development Environment and open indicator!ex_Timer in the EasyLanguage Editor.