Support Board
Date/Time: Thu, 06 Feb 2025 06:57:04 +0000
[Programming Help] - sc.RecalculateChartImmediate
View Count: 660
[2020-04-01 17:53:25] |
User869657 - Posts: 31 |
Hello I'm trying to use sc.SetChartStudyInputInt combined with sc.RecalculateChartImmediate() ; this works great but as stated in the doc of sc.RecalculateChartImmediate(), "the clearing of arrays does not happen", which means that when I export data outside SC for further analysis, I end up retrieving the results of the previous inputs values' runs as well I couldn't find a function that clears the arrays, could you please let me know if there is one ? What I'm trying to achieve is to loop an input through different values, and for each retrieve data of the run to analyse. Many thanks in advance sc.RecalculateChartImmediate() |
[2020-04-01 19:17:49] |
|
The study itself will have to clear the arrays. Just simply set the values of the used Subgraph arrays to 0 at the elements where you want them to be zero.
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 |
[2020-04-17 08:36:54] |
User869657 - Posts: 31 |
Hello, Thanks again for your reply, I managed to get it working using your advice. However, I am facing another issue : setting an input's value through a for loop using sc.SetChartStudyInputInt and sc.RecalculateChartImmediate works great. But importing a SG's value from that same chart after recalculating it seems to trigger again the for loop, which then never ends. This has been tested using both automatic and manual looping Attached a short code with this issue : adding line 27 (sc.GetStudyArrayFromChartUsingID) seems to trigger the endless repeat of for loop Could you please let me know if I misunderstood something about these functions Many thanks in advance. |
![]() Attachment Deleted. |
To post a message in this thread, you need to log in with your Sierra Chart account: