Triangle Class
A triangle is a chart pattern used in technical analysis. Like trendlines, triangles may be drawn on charts by using a drawing tool or by using EasyLanguage code.
The Triangle class draws a triangle by connecting the specified vertices with lines. The triangle's appearance can customized using the Triangle's properties (see below).
The Triangle's vertices can be DTPoints, BNPoints, or XYPoints. Triangle vertices specified as BNPoints or DTPoints will maintain their positions relative to the bars on the chart. Triangle vertices specified as XYPoints, on the other hand, will maintain their position relative to the chart's borders. Example code is provided below that illustrates all three ways of specifying a Triangle's vertices .
Namespace: elsystem.drawingobjects
Properties
Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).
Name | Type | Description | |
Alert | object | Gets the PriceAlert associated with the Triangle. | |
FillColor | object | Gets or sets the fill color. See Color. | |
FillPattern | enum | Gets or sets the fill pattern. See FillPattern. | |
FirstVertex | object | Gets the Triangle's first vertex as a DOPoint. | |
Label | object | Gets or sets the Triangle's label as a DrawingObjectLabel. | |
SecondVertex | object | Gets the Triangle's second vertex as a DOPoint. | |
|
enum | Gets or sets the Triangle's border style. See StyleType. | |
ThirdVertex | object | Gets the Triangle's third vertex as a DOPoint. | |
V1V2ExtLeft | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the first vertex to the second vertex is extended to the left. | |
V1V2ExtRight | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the first vertex to the second vertex is extended to the right. | |
V1V3ExtLeft | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the first vertex to the third vertex is extended to the left. | |
V1V3ExtRight | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the first vertex to the third vertex is extended to the right. | |
V2V3ExtLeft | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the second vertex to the third vertex is extended to the left. | |
V2V3ExtRight | bool | Gets or sets a Boolean property that indicates whether the line segment that connects the second vertex to the third vertex is extended to the right. | |
Weight | enum | Gets or sets the Triangle's border weight. See Weight. |
Methods
Name | Description | |
Create() | Initializes a new instance of the Triangle class. | |
Create(DTPoint, DTPoint, DTPoint) | Initializes a new instance of the Triangle class. The vertices are specified as DTPoints. | |
Create(BNPoint, BNPoint, BNPoint) | Initializes a new instance of the Triangle class. The vertices are specified as BNPoints. | |
Create(XYPoint, XYPoint, XYPoint) | Initializes a new instance of the Triangle class. The vertices are specified as XYPoints. | |
SetFirstVertex(DTPoint) | Sets the Triangle's first vertex as a DTPoint. | |
SetFirstVertex(BNPoint) | Sets the Triangle's first vertex as a BNPoint. | |
SetFirstVertex(XYPoint) | Sets the Triangle's first vertex as an XYPoint. | |
SetSecondVertex(DTPoint) | Sets the Triangle's second vertex as a DTPoint. | |
SetSecondVertex(BNPoint) | Sets the Triangle's second vertex as a BNPoint. | |
SetSecondVertex(XYPoint) | Sets the Triangle's second vertex as an XYPoint. | |
SetThirdVertex(DTPoint) | Sets the Triangle's third vertex as a DTPoint. | |
SetThirdVertex(BNPoint) | Sets the Triangle's third vertex as a BNPoint. | |
SetThirdVertex(XYPoint) | Sets the Triangle's third vertex as an XYPoint. |
Example
The following example shows...
Displays triangles on a chart. |
- Click on the Import Example link to import the example into TradeStation.
- Go to the TradeStation platform and create a chart window. Use the Insert - Indicator menu sequence and Add !Ex_Triangle to the window.
- To review or modify the example code, go to the TradeStation Development Environment and open indicator !Ex_Triangle in the EasyLanguage Editor.
Inheritance Hierarchy
elsystem.DrawingObjects.DrawingObject
elsystem.DrawingObjects.Triangle