Finding a list of data series objects

Questions about MultiCharts .NET and user contributed studies.
MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Finding a list of data series objects

Postby MidKnight » 14 Oct 2012

Hi there,

Is there anyway to get a list of the data series objects that are on a chart?

With thanks in advance,
MK

User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2704 times

Re: Finding a list of data series objects

Postby Henry MultiСharts » 15 Oct 2012

Hello MidKnight,

check out "IInstrument".

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Finding a list of data series objects

Postby MidKnight » 16 Oct 2012

Hi there Henry,

I don't see how IInstrument helps me - maybe you can be more specific. I want a list of all the data series objects on a chart so I can iterate through them all. There may be any number of streams on the chart so hardcoding the data stream count is not practical.

All my best,
MK

User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2704 times

Re: Finding a list of data series objects

Postby Henry MultiСharts » 16 Oct 2012

Hello MidKnight,

With MaxDataStream you can check the maximum number of the data series on the chart.
With CStudyControl.IsExist you can check what dataseries are present on the chart and what are missing.

Using BarsOfData you can get access to the data of the certain dataseries. With IInstrument you can get all of the information regarding this data series.

MidKnight
Posts: 343
Joined: 12 Aug 2012
Has thanked: 123 times
Been thanked: 56 times

Re: Finding a list of data series objects

Postby MidKnight » 16 Oct 2012

Thanks for the reply Henry. I had seen the MaxDataStreams property but the help says:
Read-only property. Maximum available number of datastreams allowed on the chart.


But you are saying it is telling you the total number of data streams on the chart. That is why I was confused. I'll do some testing on my own with this property, but I think the help file isn't clear and/or the name of the property is ambiguous. DataStreamCount would have been a much clearer name to me.

Thanks again for the reply. You teach me a lot.

With kind regards,
MK

User avatar
Henry MultiСharts
Posts: 8443
Joined: 25 Aug 2011
Has thanked: 1207 times
Been thanked: 2704 times

Re: Finding a list of data series objects

Postby Henry MultiСharts » 18 Oct 2012

Hello MidKnight,

Thank you. We'll fix the description.

The correct one is:
IStudy.MaxDataStream Property
Read-only property. The maximum index number of datastreams present on the chart.
These users thanked the author Henry MultiСharts for the post:
MidKnight


Return to “MultiCharts .NET”