Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 19:28:59 +0000



Accessing study name / subgrapjs from another chart

View Count: 831

[2016-02-09 19:02:24]
User99735 - Posts: 234
Hi,
When I try to access a study name / subgrapjs from another chart, the code is returning the study name from the current chart on which the study with the following code is applied -

SCInputRef StudySubgraphReference = sc.Input[0];
StudySubgraphReference.Name = "Spread Sheet Chart And Study No";
StudySubgraphReference.SetChartStudyValues(1, 1);

char msg[1000];
sprintf(msg, "Signal - %sd", sc.GetStudyNameFromChart(StudySubgraphReference.GetChartNumber(), StudySubgraphReference.GetStudyID()));
sc.AddMessageToLog(msg, false);

Please advice.

Regards,

Vivek
[2016-02-09 22:21:16]
Sierra Chart Engineering - Posts: 104368
This means that the StudySubgraphReference Input is not set to the correct chart number.
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
Date Time Of Last Edit: 2016-02-09 22:21:29
[2016-02-09 22:25:14]
User99735 - Posts: 234
Hi,
There were two charts open #1 and #2, and the test study was running in #2 and the target study on #1. In the setting window of test study in #2, when #1 was entered in chart no, the correct study names and number appeared in the second dropdown.

Please test at your end and revert.

Regards

Vivek
[2016-02-09 22:32:37]
Sierra Chart Engineering - Posts: 104368
We ran a test now and confirmed there is nothing wrong. There must be something you are misunderstanding or doing incorrectly.

Refer to this study function here which uses that function:
/ACS_Source/Studies6.cpp >> scsf_DifferenceBar

In Sierra Chart this is called Difference (Bar).
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
[2016-02-09 22:44:20]
User99735 - Posts: 234
Hi,
This example does not use StudySubgraphReference, do you have any example of same?

Regards

Vivek
[2016-02-09 23:13:37]
Sierra Chart Engineering - Posts: 104368
The study function we referenced does access the first study graph with ID 0 which is the underlying the price graph of the chart.

Refer to this study function instead:
/ACS_Source/Studies8.cpp >> scsf_StudyOverlayOHLC
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
Date Time Of Last Edit: 2016-02-09 23:14:23
[2016-02-09 23:14:56]
Sierra Chart Engineering - Posts: 104368
We made a slight mistake in the prior post and corrected it. This is the study function you need to look at:
/ACS_Source/Studies8.cpp >> scsf_StudyOverlayOHLC
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
Date Time Of Last Edit: 2016-02-09 23:15:10
[2016-02-10 17:41:03]
User99735 - Posts: 234
Ok, last query, will / does this work for spreadsheet also?

Regards

Vivek
[2016-02-10 17:52:10]
Sierra Chart Engineering - Posts: 104368
We do not understand the question.
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
[2016-02-10 17:54:56]
User99735 - Posts: 234
Query was, that instead of an ACSIL study, if a spreadsheet study is attached to a chart, can the column data of the spreadsheet be accessed from another chart using the sample code in scsf_StudyOverlayOHLC. Still not working for me.

Regards

Vivek
[2016-02-10 18:16:27]
Sierra Chart Engineering - Posts: 104368
The answer is yes. Here is the documentation for the study:
https://www.sierrachart.com/index.php?page=doc/doc_TechnicalStudiesReference.html#s149

As a programmer, you should not have any trouble whatsoever using a study.
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
Date Time Of Last Edit: 2016-02-10 18:16:39

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

Login

Login Page - Create Account