Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 12:19:23 +0000



How do I change the inputs of a Study added through AddStudy.

View Count: 320

[2023-11-21 00:28:20]
KylieV1618 - Posts: 67
Ive added a Market Profile programmatically to my chart.
That works fine...but I need to make adjustments to its parameters.


n_ACSIL::s_AddStudy AddStudy;
AddStudy.ChartNumber = sc.ChartNumber;
AddStudy.StudyID = 141;
AddStudy.ShortName = "Market Profile";
    

How do I get the Unique study ID for this study/subgraph, to make adjustments to its inputs??
I want to change its Right Align, Volume Graph Period Type, Ticks Per Volume Bar, and Peak/Valley Sensitivity.
As well as get access to its
sc.GetStudyPeakValleyLine

I tried this...

int studyID = sc.AddStudyToChart(AddStudy);
sc.SetChartStudyInputInt(sc.ChartNumber, studyID, 32, 1);

But that doesn't work.
please let me know how to make adjustments to the Study after I add it to the chart.
I can't seem to find the relevant documentation
Date Time Of Last Edit: 2023-11-21 00:29:38
[2023-11-21 04:20:59]
Sierra_Chart Engineering - Posts: 17179
That probably does not work because there is a delay with adding the study. So the study does not actually exist at the time you are setting its input. This is something we would have to look at more closely to understand what is happening.

Usually the way that you are going to get the study Identifier of a study, is through this type of input and then you manually select it:
ACSIL Interface Members - sc.Input Array: sc.Input[].SetStudyID()

Or you can remember the Study ID after adding the study and then change the inputs at the next chart calculation.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-11-21 04:21:35
[2023-11-21 04:32:02]
KylieV1618 - Posts: 67
I was hoping I could add the studies myself, and then adjust them programmatically accordingly.
Because if a user sets these settings, my indicator won't work as intended.

They can't just add 3 market profiles willy nilly because each one requires different settings.
It is based on a very specific setup, so I need to set it Programmatically.

I guess the workaround is to just programmatically set them after a user references them?
[2023-11-21 04:35:51]
KylieV1618 - Posts: 67
Also...another unrelated question.
Is there a way to historically calculate the Market Profile as the chart recalculates? so I can plot the history of the developing profile for my indicator?

Right now I only have it really plotting live, onwards from the start of the current bar (similar to Market Depth)
Or will it only work from the current index onwards (live)?

If I required historical data what would you suggest?
1. Recording the live data into a file, and then reading it, on recalculation and loading it?
2. Creating my own version of the market profile array/values, using a rolling window of my own implementation?
[2023-11-22 15:57:05]
Sierra_Chart Engineering - Posts: 17179
Yes:

I guess the workaround is to just programmatically set them after a user references them?

Not sure we understand this:

Is there a way to historically calculate the Market Profile as the chart recalculates? so I can plot the history of the developing profile for my indicator?

But have a look at the TPO Value Area Lines study:
TPO Value Area Lines

There is an Input option to draw those as developing lines.

This is not within the scope of our support:


If I required historical data what would you suggest?
1. Recording the live data into a file, and then reading it, on recalculation and loading it?
2. Creating my own version of the market profile array/values, using a rolling window of my own implementation?

There is no way we can answer a question like this. You have to make your own determinations.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-11-23 21:16:29]
User453293 - Posts: 11
I am trying to do the same (or similar) thing... programmatically add a study customized for the current context. Even if we could assign the customizations in the addStudy call itself, that would really help.
[2023-11-23 23:09:43]
Sierra_Chart Engineering - Posts: 17179
No that is not going to be supported. No chance of that.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-11-24 00:10:17]
User453293 - Posts: 11
Without being able to programmatically set a tool configuration or customize a study that is being added, the addStudy functionality has very limited usefulness.
[2023-11-24 00:21:13]
User453293 - Posts: 11
Also, it's a little perplexing why there's "no chance of that" when you already have a way to modify an existing chart.
[2023-11-27 15:23:48]
Sierra_Chart Engineering - Posts: 17179
ACSIL does give you a way to modify a study Inputs but the study does have to exist on the chart first.


And there is a delay when adding a study through ACSIL.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account