Login Page - Create Account

Support Board


Date/Time: Mon, 23 Dec 2024 00:01:45 +0000



Post From: sc.GetStudyArrayFromChartUsingID not working correctly?

[2015-05-09 05:10:32]
CustomIndicators - Posts: 126
For anyone in the future with a similar issue, I found the error in my code. It was just a simple programming mistake.

I had:
SCFloatArray StudyReference;

sc.GetStudyArrayFromChartUsingID(1, 1, 0, StudyReference);



float valuE;

valuE = StudyReference[0];



SCString BufferOne;

BufferOne.Format("Value: %f", valuE);

sc.AddMessageToLog(BufferOne, 0);

When I should have had:
SCFloatArray StudyReference;

sc.GetStudyArrayFromChartUsingID(1, 1, 0, StudyReference);



float valuE;

valuE = StudyReference[sc.Index];



SCString BufferOne;

BufferOne.Format("Value: %f", valuE);

sc.AddMessageToLog(BufferOne, 0);

Date Time Of Last Edit: 2015-05-09 05:10:55