Page 1 of 1

Add Candles before index 0

Posted: Fri May 18, 2007 11:08 am
by 9244858
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.

Posted: Fri May 18, 2007 11:40 am
by narcis
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.

Posted: Fri May 18, 2007 11:50 am
by narcis
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.

Posted: Fri May 18, 2007 2:51 pm
by 9244858
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

Posted: Fri May 18, 2007 2:59 pm
by narcis
Hi Cristina,

If you change swapped XValues items you may also need to change same items position in Labels ValueList.