Is there a check to return if the chart contains Data2 ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
justme
Posts: 56
Joined: 08 Jan 2015
Has thanked: 9 times
Been thanked: 3 times

Is there a check to return if the chart contains Data2 ?

Postby justme » 22 Jan 2015

Hi, I am writing some code that I would like to run on various charts. If the chart contains Data2 the code will run a process on both Data1 and Data2, if the chart only contains Data1, it will bypass data2. Is there a way to check if Data2 exists in the chart to allow this bypass? Otherwise I won't be able to run the code on charts with just Data1 as it will throw the error "Study is missing data2".

I assume the word Data2 in a study will automatically throw the error when there is no data2 in the chart, but thought I would ask.

Thanks. Gordon

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Is there a check to return if the chart contains Data2 ?  [SOLVED]

Postby Andrew MultiCharts » 22 Jan 2015

Hello justme,

Unfortunately there is no way you can check if there is data 2 or not without referencing it, what makes such code not applicable to charts with only 1 data series.


Return to “MultiCharts”