Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 06:58:27 +0000



Post From: Accessing a subgraph value at an index

[2019-11-06 15:23:21]
bradh - Posts: 859
There is a problem with your declaration of the subgraph and then assigning a value to it. The basic method follows. You will need to modify it to suit your needs.

Let's say you want the BarOpen subgraph to be equal to the Bar Open for each bar.

The SCSubgraphRef declaration should be (you cannot assign a value to it like SC_OPEN when declaring it):

SCSubgraphRef BarOpen = sc.Subgraph[0];

You then assign the Open to the subgraph like this:

BarOpen[Index] = sc.BaseDataIn[SC_OPEN][Index];