Login Page - Create Account

Support Board


Date/Time: Thu, 20 Feb 2025 19:51:39 +0000



[Programming Help] - How to change drawing order (above|below) of subgraphs in ACSIL study?

View Count: 704

[2021-01-17 11:14:45]
User164131 - Posts: 19
Hello, I am trying to make my own study based on your examples. It has two subgraphs:
1. extension line of VPOC (as a line)
2. VPOC of the bar (as a dash)


SCSubgraphRef Subgraph_ExtensionLines = sc.Subgraph[0];
SCSubgraphRef Subgraph_VPOC = sc.Subgraph[1];

The question is how to draw an extension line below (underneath) the dash? I tried to change the order of subgraphs (VPOC as SG1, extension line as SG2) and vice versa but unfortunately, the extension line always draws above the dash (see screenshot).



P.S.

VPOC code

Subgraph_VPOC.Data[BarIndex] = sc.TicksToPriceValue(VolumeAtPrice.PriceInTicks);

extension line code

n_ACSIL::s_LineUntilFutureIntersection LineUntilFutureIntersection;
LineUntilFutureIntersection.StartBarIndex = BarIndex;
LineUntilFutureIntersection.LineValue = sc.TicksToPriceValue(VolumeAtPrice.PriceInTicks);
LineUntilFutureIntersection.LineColor = Subgraph_ExtensionLines.PrimaryColor;
LineUntilFutureIntersection.LineWidth = Subgraph_ExtensionLines.LineWidth;
LineUntilFutureIntersection.LineStyle = Subgraph_ExtensionLines.LineStyle;
sc.AddLineUntilFutureIntersectionEx(LineUntilFutureIntersection);

imageScreenshot (665).png / V - Attached On 2021-01-17 11:01:12 UTC - Size: 20.15 KB - 223 views
[2021-01-18 06:14:01]
Flipper - Posts: 65
Have you tried to change the order that you list the subgraphs defaults code block?
[2021-01-18 07:19:20]
User164131 - Posts: 19
Yes, Flipper, I already tried to:

1. change subgraph numbers

SCSubgraphRef Subgraph_ExtensionLines = sc.Subgraph[0];
SCSubgraphRef Subgraph_VPOC = sc.Subgraph[1];
to
SCSubgraphRef Subgraph_ExtensionLines = sc.Subgraph[1];
SCSubgraphRef Subgraph_VPOC = sc.Subgraph[0];

2. change subgraphs order in "sc.SetDefaults" section

3. change subgraphs order in the main section of code

Same result — extension lines are above the dashes (see screenshot)
imageScreenshot (666).png / V - Attached On 2021-01-18 07:06:52 UTC - Size: 26.4 KB - 219 views

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

Login

Login Page - Create Account