Login Page - Create Account

Support Board


Date/Time: Tue, 04 Feb 2025 15:56:01 +0000



[Programming Help] - Recalculate chart with sc.RecalculateChartImmediate

View Count: 957

[2020-01-26 21:35:31]
User869657 - Posts: 31
Hello SC Engineering team,

Similarly to what is explained in the below post, I am trying to backtest a strategy, modifying the parameters' values to see how it behaves as follows :

for loops on my parameters' values
{
Update the parameters' values with sc.SetChartStudyInputInt and trying to recalculate the chart with sc.RecalculateChartImmediate
loop through the bars, apply strategy and export data in csv file
}

Unfortunately, I cannot make the sc.RecalculateChartImmediate function work (it actually doesnt do anything). I have looked through the ACSIL doc and found the functions sc.RecalculateChart and sc.FlagFullRecalculate (for which I have seen the function you have provided as example, "SCSFExport scsf_PeriodicChartRecalculation") but both produce the same results which is that the chart keeps being recalculated, as if someone kept cliking on "Apply" in the studies' window

Could you please let me know if I am misunderstanding the use of sc.RecalculateChartImmediate and if yes, kindly guide me through it ?

Thanks a lot in advance

ACSIL / RecalculateChart and GetStudyArrayFromChartUsingID problem ?
[2020-01-27 06:18:49]
Sierra_Chart Engineering - Posts: 18242
What you are trying to do is not supported with that function. This is explained here:
sc.RecalculateChartImmediate()
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-01-27 06:41:55]
User869657 - Posts: 31
Noted, thank you. Is there any function that could work please ? The function I am looking for would be the equivalent of clicking "Apply" in the studies' window
[2020-01-27 19:07:08]
Sierra_Chart Engineering - Posts: 18242
You cannot calculate a chart while execution is in a study function on that chart. You could use sc.FlagFullRecalculate for a delayed recalculate.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account