Login Page - Create Account

Support Board


Date/Time: Thu, 06 Mar 2025 22:16:40 +0000



[Programming Help] - Drawing on Study Subgraph

View Count: 915

[2022-01-27 22:19:37]
tietzmann - Posts: 11
Hi,
I added a subgraph on my chart by using the study "Add Additional Symbol". Now I would like to use function sc.AddLineUntilFutureIntersection to add a line to the subgraph, but it is not working. On the main chart it works just fine, but not on the subgraph chart.

On my code I have the subgraph chart as an input:
SCInputRef Input_StudySubgraphReference = sc.Input[1];

Input_StudySubgraphReference.Name = "Study Subgraph Reference";
Input_StudySubgraphReference.SetStudySubgraphValues(0, 0);

I am also accessing the subgraph array like this:
sc.GetStudyArrayUsingID(Input_StudySubgraphReference.GetStudyID(), Input_StudySubgraphReference.GetSubgraphIndex(), StudySubgraphArray);

I tried something like this, but it didn't work:
SCSubgraphRef SubReference = sc.Subgraph[Input_StudySubgraphReference.GetSubgraphIndex()];
SubReference.AddLineUntilFutureIntersection

Thanks,
Juliano
[2022-02-12 12:12:56]
tietzmann - Posts: 11
Any ideas?

Basically what I want to do is calling a function that is available on sc, but I want to use the function on the subgraph chart.
So sc.AddLineUntilFutureIntersection() works fine, but draws the line on the main chart. I would like to draw the line on my subgraph chart (panel 2 for example).
[2022-02-12 12:50:55]
User431178 - Posts: 609
So sc.AddLineUntilFutureIntersection() works fine, but draws the line on the main chart

The study that is used for drawing extension lines needs to be set to the chart region in which you want to draw.
You can then either set the 'Based On' to reference the relevant study, or get the required data using sc.GetStudyArrayUsingID as you mentioned before.

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

Login

Login Page - Create Account