Login Page - Create Account

Support Board


Date/Time: Fri, 22 Nov 2024 15:59:49 +0000



Post From: Persistent subgraphs

[2024-10-14 17:57:54]
KylieV1618 - Posts: 67
Hi there,

Im using sc.GetBasicSymbolData() to get live data from a bunch of stocks.

Im pushing some of this live data into a sc.Subgraph[1].Arrays[0][];
Doing some calculations and then displaying into sc.Subgraph[1];

This all works fine, as long as the chart is running and never gets refreshed.
But upon recalculation, my averages no longer work, because the data gets cleared.

So what would be the best method to store the Arrays data a little more 'permanently'??
Note: I am aware that I can use Reference Charts / sc.GetChartBaseData() to achieve this, but I'm specifically trying to use live data, that I otherwise would not have historical access to. ( for reasons )

Is the best choice for this.. :

1) Just storing the whole sc.Subgraph into a sc.GetPersistentPointer()?? (so that on recalculation I dont lose the days progress). O
or
2) Writing the data to a file, that continues indefinitely (so that I can have historical data)
and then any time the chart reloads or even sierra reload, it will load all the data back into the subgraph

Which do you think is the best option.

And if I choose the file writing method, is there any examples I can look at? (documentation?)

Thanks
Date Time Of Last Edit: 2024-10-14 18:05:05