dear steema,
When i tried to convert series type Candle(OHLC) to HighLow type series disappeared from chart. Even when i tried on TeeChart Example demo, the same problem occurs.
Candle(OHLC) to HighLow type series disappeared
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Candle(OHLC) to HighLow type series disappeared
Hello,
However, you can use something like this:
That's because OHLC series types can only be converted into other series types which are derived from OHLC. As HighLow is not derived from OHLC the conversion fails.Quant wrote: When i tried to convert series type Candle(OHLC) to HighLow type series disappeared from chart. Even when i tried on TeeChart Example demo, the same problem occurs.
However, you can use something like this:
Code: Select all
Candle candle = new Candle();
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(candle).FillSampleValues(200);
}
private HighLow ConvertCandleToHighLow(Candle c)
{
HighLow result = new HighLow();
for (int i = 0; i < c.Count; i++)
{
result.Add(c.DateValues[i], c.HighValues[i], c.LowValues[i]);
}
return result;
}
private void button4_Click_1(object sender, EventArgs e)
{
HighLow h = ConvertCandleToHighLow(candle);
tChart1.Series.Remove(candle);
tChart1.Series.Add(h);
}
Best Regards,
Christopher Ireland / 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 |
Re: Candle(OHLC) to HighLow type series disappeared
Dear Steema,
Sorry to say that, but we cant use this resolution in our application as series in our graph can contain millons of records. also we gave feature to our application user to change series type as per his requirement at runtime.
So we requre this feature to work with Series.ChangeType() like other types are working.
Sorry to say that, but we cant use this resolution in our application as series in our graph can contain millons of records. also we gave feature to our application user to change series type as per his requirement at runtime.
So we requre this feature to work with Series.ChangeType() like other types are working.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Candle(OHLC) to HighLow type series disappeared
This ticket id=1222 has now been fixed.Quant wrote:So we requre this feature to work with Series.ChangeType() like other types are working.
Best Regards,
Christopher Ireland / 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 |