Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 05:59:36 +0000



[Programming Help] - Not working functions to change the values of a manual Volume profile I draw.

View Count: 480

[2020-04-17 21:48:18]
User712062 - Posts: 14
Hello .
I am using the following functions to change the values of a manual Volume profile I draw.
It is not working. I need your assistance .Can someone tell please What is the proper way to pass the date and time into these function in a correct way.
The end date and end Time or either become zero or the end date becomes a date in the past that I never use .Thanks in advance.
time = std::modf(sc.BaseDateTimeIn[ri], &date);
sc.GetChartStudyInputInt(sc.ChartNumber, study, 37, oldDate);
sc.SetChartStudyInputInt(sc.ChartNumber, study, 37, int(date));
sc.GetChartStudyInputFloat(sc.ChartNumber, study, 39, oldTime);
sc.SetChartStudyInputFloat(sc.ChartNumber, study, 39, time);
time1 = std::modf(lastBarDate, &date1);
sc.GetChartStudyInputInt(sc.ChartNumber, study, 40, oldDate1);
sc.SetChartStudyInputInt(sc.ChartNumber, study, 40, int(date1));
sc.GetChartStudyInputFloat(sc.ChartNumber, study, 41, oldTime1);
sc.SetChartStudyInputFloat(sc.ChartNumber, study, 40, time1);
[2020-04-18 17:46:04]
User907968 - Posts: 804
Hi,

You are referring to the wrong inputs, they are labelled from 1-128, but indexed from 0-127.
See the comment next to 'Input Index' sc.GetChartStudyInputFloat()

e.g. Start Date: input label = 37 -> input index = 36
[2020-04-20 22:40:36]
User712062 - Posts: 14
USER 907968. Thanks a lot for your help. You saved me money because on friday I was about to set my computer on fire out of frustration jejeje. Thanks.Would it be too much if I ask you a couple of question related to the VP either here on in private? Thanks again.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account