Gaps in data using Candle chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Gaps in data using Candle chart

Post by WD_Gordon » Tue Jul 08, 2008 8:15 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 09, 2008 7:26 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Wed Jul 09, 2008 12:26 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 09, 2008 1:06 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Wed Jul 09, 2008 1:13 pm

:oops: Okay, I'm an idiot. I did find it. Sorry, yesterday was a long day for me... Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jul 09, 2008 1:21 pm

Hi Kevin,

No problem :). If everything was that easy ... ! :wink:
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Wed Jul 09, 2008 1:21 pm

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

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Thu Jul 10, 2008 2:08 pm

Narcís,

Am I correct in my last post or am I still missing somethings?

Thanks,
Kevin

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jul 10, 2008 2:28 pm

Hi Kevin,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

WD_Gordon
Newbie
Newbie
Posts: 49
Joined: Wed Jun 18, 2008 12:00 am

Post by WD_Gordon » Thu Jul 10, 2008 2:47 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jul 11, 2008 9:47 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply