Represents the Trend Line chart object. A straight line that can be drawn from point 1 to the point 2 in any direction to mark the trends on the chart.
Signature
1
publicabstractinterfaceChartTrendLine
Namespace
cAlgo.API
Examples
1 2 3 4 5 6 7 8 91011121314151617
usingcAlgo.API;namespacecAlgo{// This sample shows how to use Chart.DrawTrendLine to draw a trend line on chart[Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]publicclassChartTrendLineSample:Indicator{protectedoverridevoidInitialize(){vartrendLine=Chart.DrawTrendLine("trendLine",Chart.FirstVisibleBarIndex,Bars.LowPrices[Chart.FirstVisibleBarIndex],Chart.LastVisibleBarIndex,Bars.HighPrices[Chart.LastVisibleBarIndex],Color.Red,2,LineStyle.Dots);trendLine.IsInteractive=true;}publicoverridevoidCalculate(intindex){}}}