EasyLanguage Object Reference
About Classes in EasyLanguage
An EasyLanguage class defines the structure for an object
that can contain members such as properties, members, and events. Much
like a blueprint, a class describes the actions (behavior) the an object
can perform and the information (data) it can access.
The following are some of the terms are commonly associated with classes:
- Objects - Instances of
a class that allow users to access the methods and properties defined
by the class from which it is created. Multiple instances of
the same class may be declared and used in an EasyLanguage document.
- Properties - Members
of a class that allow your code to read and/or write stored values.
Each instance of a class (object) shares the same property definitions
but can have different property values specific to that object.
- Methods - Members of
a class that perform specific actions (much like a function) within
a class such as data retrieval and calculations. Methods often
accept parameters (input values). They can return data of a
specified type or can be void (not return a value). See Method
for a description of the EasyLanguage reserved word used to create
a local method.
- Constructors - Special
methods that execute each time a new
instance of a class (object) is created. Use constructors to initialize
the state of your new object See Class Declaration for a generic
class declaration and initialization example.
- Dot operator - The period
symbol (.) to the right of an object name is used to refer to a child
element of an object (such as a property or method). For instance,
in the expression PositionProvider1.Count, the dot operator indicates
that the term Count is referring to an element of the object named
PositionProvider1 that returns the number of available market positions
within object.
Class
Categories
Although each class
has a unique set of properties and methods, it is useful to think
of them belonging to broad categories so that you'll have a better
idea of what similar classes are designed to do.
- Components - Classes that are designed to be
added to an EasyLanguage document from the TradeStation Development
Environment toolbox
and will automatically generate protected code that contains
objects whose properties and events can be managed using the
Properties
editor. A number of components, such as Providers and
OrderTickets, are found in the TSData namespace sections of
the Dictionary.
- Collections - Classes that allow you to create
objects that represent of collection of values that can be
stored and accessed using common programming models including
dictionaries, stacks, queues, and vectors.
- Enumerations - Classes that consist of
a set of named constants called enumerators that typically
allow you to evaluate a state or action associated with a
property of another class.
- Exceptions - Classes that are typically used
to identify errors and will throw an exception if the condition
is true. The Exception base class provide a common set of
methods and properties that may be accessed for these exceptions
- Support
Classes - Classes that designed
to be used by higher level classes (such as Components) and
generally reside in the same namespace as the classes that
reference them.
- System
Classes - Classes that provide
a general framework for other classes and typical reside under
the ELSystem library.