Trend Lines
- 2 minutes to read
A Trend Line is an indicator presented by a line drawn through two data points of a series.
#How to Add a Trend Line to a Chart
The following markup shows how to add two trend lines to a chart:
<dxc:StockSeries2D.Indicators>
<dxc:TrendLine x:Name="trendLine1"
Argument1="6/26/2016"
ValueLevel1="High"
Argument2="7/31/2016"
ValueLevel2="High"
ExtrapolateToInfinity="False"
LegendText="Resistance Trend Line"
ShowInLegend="True"/>
<dxc:TrendLine x:Name="trendLine2"
Argument1="6/1/2016"
ValueLevel1="Low"
Argument2="6/26/2016"
ValueLevel2="Low"
LegendText="Support Trend Line"
ShowInLegend="True"/>
</dxc:StockSeries2D.Indicators>
The table lists classes and properties required to draw trend lines:
Class or Property | Description |
---|---|
XYSeries2D. |
Provides access to the collection of indicators that belong to the current series. |
Trend |
Represents an individual Trend Line. |
Financial |
Gets or sets an argument of the first financial indicator’s point. |
Financial |
Gets or sets a value indicating how to obtain the first value of a financial indicator’s point. |
Financial |
Gets or sets an argument of the second financial indicator’s point. |
Financial |
Gets or sets a value indicating how to obtain the second value of a financial indicator’s point. |
Trend |
Specifies whether the Trend Line is extrapolated to infinity. |
Trend |
Specifies whether the Trend Line is extrapolated to negative infinity. |
Indicator. |
Gets or sets the text that identifies the indicator within the legend of a chart control. |
Indicator. |
Specifies whether the indicator (Fibonacci Indicators, Regression Lines, Moving Average and Envelope or Trend Lines) is represented in the chart’s legend. |
Tip
Set the Indicator.
Note
To learn more about the common indicator settings, examine the Indicators help document.
See Also