Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 18:40:24 +0000



Post From: sc.GetStudyArrayFromChartUsingID

[2015-04-24 22:34:55]
CustomIndicators - Posts: 126
I'm trying to make a manual loop that checks conditions on every chart I have up. For this, it would be easier if I could just specify the chart number outside of the defaults.

Instead of this:
SCInputRef StudySubgraphReference = sc.Input[0];

if (sc.SetDefaults)
{
StudySubgraphReference.Name = "Study And Subgraph To Display";

StudySubgraphReference.SetChartStudySubgraphValues(1,1, 0);
return;
}

SCFloatArray StudyReference;
sc.GetStudyArrayFromChartUsingID(StudySubgraphReference.GetChartStudySubgraphValues(), StudyReference);

Can I just use this?:
SCFloatArray StudyReference;
int chartNumber = 1;
sc.GetStudyArrayFromChartUsingID(chartNumber, 1, 0, StudyReference);