Login Page - Create Account

Support Board


Date/Time: Fri, 14 Mar 2025 18:05:35 +0000



[Programming Help] - Study Reference

View Count: 619

[2022-05-06 08:07:24]
User39772 - Posts: 311
If I use study reference within my own ACSIL study, normally I can select one of the subgraphs from the study settings.
In the case of study "Volume at Price Threshhold Alert" this seems to be not possible.
Is there a way to reference SG1 - SG3 ?
Date Time Of Last Edit: 2022-05-06 08:07:53
[2022-05-07 10:28:46]
Sierra Chart Engineering - Posts: 104368
You can certainly reference a Subgraph in any study. It does not matter the particular study. What is it you are specifically trying to reference from Volume at Price Threshold Alert?
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-05-07 12:05:59]
JohnR - User831573 - Posts: 319
If you are using ACSIL - there is this function
void GetStudyArraysFromChartUsingID(int ChartNumber, int StudyID, SCGraphData& GraphData);
The sc.GetStudyArraysFromChartUsingID() function gets all of the study arrays from the study specified by the ChartNumber and the unique StudyID parameters.
The StudyID is the unique study identifier.

There is sample source in studies8.cpp that shows getting multiple subgraphs outputs from multiple studies.
\SierraChart\ACS_Source\studies8.cpp (1 hit)
  Line 218: SCSFExport scsf_StudySubgraphsAverageMultiple(SCStudyInterfaceRef sc)

JohnR
[2022-06-21 19:50:07]
User39772 - Posts: 311
Hello,

when I use the following code from your example:

if (sc.GetStudyArrayUsingID(sc.Input[1].GetStudyID(), 0, StudyReference) > 0
&& StudyReference.GetArraySize() > 0)
{

//Copy the study data that we retrieved using GetStudyArrayUsingID, into a subgraph data output array
sc.Subgraph[0][sc.Index] = StudyReference[sc.Index];
}


and when I display the sc.Subgraph[0] in the chart, I do not see all values from Index 0, only the values from new updated candles.

What can I do to see all values of historical data loaded also, even if real time data is switched off.

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

Login

Login Page - Create Account