Skip to content

ChartPoint constructor

constructor · ChartPoint · cAlgo.API Since 5.10

DesktopCLICloud

Represents a single chart anchor point - a time value on the X-axis and a Y-axis value.

Definition

public ChartPoint(DateTime Time, double Y)
ChartPoint(Time: DateTime, Y: float)

Parameters

Name C# type Python type Description
Time DateTime DateTime The time value on the X-axis.
Y double float The Y-axis value.

Examples

var start = new ChartPoint(Bars.OpenTimes.Last(40), Bars.HighPrices.Last(40));
var waveA = new ChartPoint(Bars.OpenTimes.Last(30), Bars.LowPrices.Last(30));
var waveB = new ChartPoint(Bars.OpenTimes.Last(20), Bars.HighPrices.Last(20));
var waveC = new ChartPoint(Bars.OpenTimes.Last(10), Bars.LowPrices.Last(10));
Chart.DrawElliottCorrection("correction", start, waveA, waveB, waveC, Color.Blue);
Print("Wave C point: {0} at {1}", waveC.Time, waveC.Y);
start = ChartPoint(api.Bars.OpenTimes.Last(40), api.Bars.HighPrices.Last(40))
waveA = ChartPoint(api.Bars.OpenTimes.Last(30), api.Bars.LowPrices.Last(30))
waveB = ChartPoint(api.Bars.OpenTimes.Last(20), api.Bars.HighPrices.Last(20))
waveC = ChartPoint(api.Bars.OpenTimes.Last(10), api.Bars.LowPrices.Last(10))
api.Chart.DrawElliottCorrection("correction", start, waveA, waveB, waveC, Color.Blue)
api.Print(f"Wave C point: {waveC.Time} at {waveC.Y}")