Add Candles before index 0

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
quickweb
Newbie
Newbie
Posts: 13
Joined: Mon Apr 16, 2007 12:00 am
Contact:

Add Candles before index 0

Post by quickweb » Fri May 18, 2007 11:08 am

Hello,

I need to add data at runtime for a candle data series, with the method to skip weekends, given by you.

While this is fairly easy if you try to add candles after the newest one, the problem appears on adding candles before the first candle on my chart. Is there any method to add candles before candle with index 0?

Please note that I need to skip the weekends, that is if I don't add candle information for Saturdays and Sundays, the chart must not show up "holes" in the data
I would need to add candles before the first candle and after last candle, on runtime, many times.
I preffer the answer in Borland C++, but it is not so big deal if the answer is in Delphi.

Thank you,
Cristina.

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 May 18, 2007 11:40 am

Hi Cristina,

There's no such method, you should just use AddCandle specifying date as X series' x value. If you want the first date in the chart having index 0 then you should use series' SwapValueIndex method. You'll get the index of the value you've just added from the integer index AddCandle method returns.
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

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 May 18, 2007 11:50 am

Hi Cristina,

In my reply before I forgot to tell you that you can sort XValues ValueList as shown here. This may avoid you the hassle of sorting ValueList using SwapValueIndex.
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

quickweb
Newbie
Newbie
Posts: 13
Joined: Mon Apr 16, 2007 12:00 am
Contact:

Post by quickweb » Fri May 18, 2007 2:51 pm

Hello again,
After many trials without any success I have a observation:

1. if I put date as X series' x value , the problem with weekends it is not solved.

Could you answer to me if there is any possibility to order after label value?

Thank you,
Cristina

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 May 18, 2007 2:59 pm

Hi Cristina,

If you change swapped XValues items you may also need to change same items position in Labels ValueList.
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