Skip to content

Add4 Method

Description

Adds a new ChartSeriesPoint to a series's collection of points. Typically used to add points to a CandleStick or HighLow chart series.

Syntax

Public Function Add4( _
    ByVal [Argument](#) As Variant, _
    ByVal [Value1](#) As Double, _
    ByVal [Value2](#) As Double, _
    ByVal [Value3](#) As Double, _
    ByVal [Value4](#) As Double _
) As [ChartSeriesPoint](XtremeChartControl~ChartSeriesPoint.md)

Parameters

  • Argument: String value denoting the argument. Typically a date (in string format) in a financial chart.
  • Value1: Low value for the day (in terms of a candlestick chart).
  • Value2: High value for the day (in terms of a candlestick chart).
  • Value3: Opening value for the day (in terms of a candlestick chart).
  • Value4: Closing value for the day (in terms of a candlestick chart).

Return Type

Reference to the ChartSeriesPoint to be added.

Remarks

Add4 is intended to be used to add points to a CandleStick or HighLow chart series. This allows you to add the date, high/low values for the day, and the opening and closing values for the day.

For a financial chart, you need to set the ArgumentScaleType = xtpChartScaleDateTime.

Candle Chart

Example

Dim Series As ChartSeries  
Set Series = ChartControl.Content.Series.Add("Stock Series")  

Series.Points.Add4 "2009-12-28", 30.89, 31.18, 31, 31.17  
Series.Points.Add4 "2009-12-29", 31.23, 31.5, 31.35, 31.39  
Series.Points.Add4 "2009-12-30", 30.8, 31.29, 31.15, 30.96  
Series.Points.Add4 "2009-12-31", 30.48, 30.99, 30.98, 30.48  
Series.Points.Add4 "2010-01-04", 30.59, 31.1, 30.62, 30.95  
Series.Points.Add4 "2010-01-05", 30.64, 31.1, 30.85, 30.96

Series.ArgumentScaleType = xtpChartScaleDateTime

See Also

ChartSeriesPointCollection Collection


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.