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

Questions about MultiCharts and user contributed studies.
biffhero
Posts: 47
Joined: 22 Sep 2020
Has thanked: 29 times
Been thanked: 7 times

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

Postby biffhero » 13 Apr 2021

I am working on an indicator that looks at data1 through data7.

I have the same question as the user in this thread:

viewtopic.php?t=48038 and I'm wondering if that thread from 2011 is still the "state of the art". :-)

Do I have to have the user set flags, or can I programmatically check to see if the data series exist?

Thanks,
Rob

User avatar
rrams
Posts: 128
Joined: 10 Feb 2011
Location: USA
Has thanked: 7 times
Been thanked: 70 times
Contact:

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

Postby rrams » 13 Apr 2021

Correct, there is still no way to programmatically check if additional data series are present on the chart.

Querying Symbol_Length Data(N) will result in a run time error if no data series is found.

Also, if a secondary data series is added and it doesn't have any data to load; then the primary data series won't load either.
So, if you add the next month's futures contract to the secondary series, but next month's contract doesn't have any trading volume yet; then your chart and signals will not run. Therefore, you can't programmatically check for no data on the secondary series even though it is there, because the signals and indicators won't initialize.

Hope this helps.


Return to “MultiCharts”