Gaps in data using Candle chart
Gaps in data using Candle chart
We are using TeeChart for .NET v3.
We have a Candle chart and we are loading various increments of data (1, 5, 15 minute, etc.) candle data into a DataTable and binding it to the chart’s DataSource property. Since the markets close for the weekends there will be gaps in time. The issue we are having is this leaves huge gap in the chart where the missing data would have been.
Is there way to eliminate these gaps in time? What we want is to have the last data point of the week followed by the first data point when the markets open.
Thanks,
Kevin Gordon
We have a Candle chart and we are loading various increments of data (1, 5, 15 minute, etc.) candle data into a DataTable and binding it to the chart’s DataSource property. Since the markets close for the weekends there will be gaps in time. The issue we are having is this leaves huge gap in the chart where the missing data would have been.
Is there way to eliminate these gaps in time? What we want is to have the last data point of the week followed by the first data point when the markets open.
Thanks,
Kevin Gordon
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kevin,
There's an example of that at Al Features\Welcome !\Chart styles\Financial\Candle (OHLC)\Axis Labels no Weekends in the features demo, available at TeeChart's program group.
There's an example of that at Al Features\Welcome !\Chart styles\Financial\Candle (OHLC)\Axis Labels no Weekends in the features demo, available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,
In the features demo I am looking at there is no
Al Features\Welcome !\Chart styles\Financial\Candle (OHLC)\Axis Labels no Weekends. There is an example candle chart at Welcome !\Chart styles\Financial\Candle (OHLC) and it states in the description above the chart "Weekend data can be removed using a sequential index for the X value." but it gives no example of doing this.
So are you saying instead of using a DateTime format for the X values to use an integer instead and handle the date presentation through the GetAxisDrawLabel event?
Do you have any real examples of doing this?
Thanks,
Kevin
In the features demo I am looking at there is no
Al Features\Welcome !\Chart styles\Financial\Candle (OHLC)\Axis Labels no Weekends. There is an example candle chart at Welcome !\Chart styles\Financial\Candle (OHLC) and it states in the description above the chart "Weekend data can be removed using a sequential index for the X value." but it gives no example of doing this.
So are you saying instead of using a DateTime format for the X values to use an integer instead and handle the date presentation through the GetAxisDrawLabel event?
Do you have any real examples of doing this?
Thanks,
Kevin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kevin,
It's strange, which TeeChart version are you using? This example has been in the demo for quite a long time. Anyway, the demo is Candle_AxisLabels.cs at "C:\Program Files\Steema Software\TeeChart for .NET v3\Examples\DemoProject\Series". I'm also going to send you the example.
It's strange, which TeeChart version are you using? This example has been in the demo for quite a long time. Anyway, the demo is Candle_AxisLabels.cs at "C:\Program Files\Steema Software\TeeChart for .NET v3\Examples\DemoProject\Series". I'm also going to send you the example.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kevin,
No problem . If everything was that easy ... !
No problem . If everything was that easy ... !
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcís,
Okay, I have looked at the code. In this example you guys are using the Add method to add the candle points. In our case we are binding the chart to a DataSource? So it looks like the we cannot have the XValues as a DateTime. We would have to have an integer column in the data table and work with the labeling manually.
Does that sound right?
Thanks,
Kevin
Okay, I have looked at the code. In this example you guys are using the Add method to add the candle points. In our case we are binding the chart to a DataSource? So it looks like the we cannot have the XValues as a DateTime. We would have to have an integer column in the data table and work with the labeling manually.
Does that sound right?
Thanks,
Kevin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kevin,
Another option would be that you converted your values to DateTime usinge DateTime.FromOADate method.
Another option would be that you converted your values to DateTime usinge DateTime.FromOADate method.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Narcís,
I tried using a double and DateTime.FromOADate but it still will leave gaps because of the break in time. It seems having a counter or in my case an identity column in my table is the only choice to avoid the gaps.
Might I recommend as an enhancement for a future release is that you provide a property that, if set, would allow the X-Axis to skip any missing dates and pickup on the next concurrent date? It appears to be somewhat common for the markets to close on weekends and is very confusing to the user to see large gaps, mostly noticeable when viewing candles with small increments such as 1, 5, and 15 minute charts.
Kevin
I tried using a double and DateTime.FromOADate but it still will leave gaps because of the break in time. It seems having a counter or in my case an identity column in my table is the only choice to avoid the gaps.
Might I recommend as an enhancement for a future release is that you provide a property that, if set, would allow the X-Axis to skip any missing dates and pickup on the next concurrent date? It appears to be somewhat common for the markets to close on weekends and is very confusing to the user to see large gaps, mostly noticeable when viewing candles with small increments such as 1, 5, and 15 minute charts.
Kevin
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Kevin,
This is already on the wish-list to be considered for inclusion in future releases.
In the meantime the only solution is manually looping your dataset and applying the same as in the demo.
This is already on the wish-list to be considered for inclusion in future releases.
In the meantime the only solution is manually looping your dataset and applying the same as in the demo.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |