Click or drag to resize

How to develop a BarType

A BarType determines how the Bars will be constructed. What kind of data will be used to construct the bars, what ChartStyle will be supported is defined here.

Basic concept

On each incoming tick (in realtime or when the historical data is read) ArthaChitra calls the Add(Bars, DateTime, Double, Double, Double, Double, Double, Double, Int64, Int64, Boolean) method. Whether the incoming tick should form a new bar or is appended with the existing bar is defined here. The AddBar(Bars, DateTime, Double, Double, Double, Double, Int64, Int64, Boolean) method or the UpdateBar(Bars, DateTime, Double, Double, Double, Int64, Int64, Boolean) method is called to add or update the bar respectively.

How the bars will be displayed on the ChartView is determined by a ChartStyle. A BarType class implements the ChartStyle property for this purpose.

The BarType may have one or more supported ChartStyles. How may ChartStyle the BarType supports is determined by the SupportedChartStyles property. A BarType must have alteast one ChartStyle in order to display it in the ChartView. This is an abstract property and user must implement it.

The BuiltDataType property determines whether the bar pulls tick data, minute data or day data from the database to construct the bars.

Xaml
See Also