Login Page - Create Account

Support Board


Date/Time: Wed, 05 Feb 2025 19:04:11 +0000



Full recalculations on new bars

View Count: 657

[2020-03-29 21:03:41]
User980227 - Posts: 7
Hello,

I have a study for which the parameters change over time and are output in a text file.

I would like to write a script in SC that reads the parameters from the text file at each bar iteration and proceeds to full recalculations like moving averages.

But I read that using automatic looping would not fully recalculate moving averages on new bars.

What would be the solution please for full moving average recalculations on new bars?

Thank you very much for your help.
Sebastian
[2020-03-30 06:12:30]
Sierra Chart Engineering - Posts: 104368
Is the moving average calculated by your study?
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-03-30 07:20:26]
User980227 - Posts: 7
No, I use sc.SimpleMovAvg() for the moment.
If I recode this function then it will fully recalculate at each new bar?

Thank you
Sebastian
[2020-03-30 17:27:36]
Sierra Chart Engineering - Posts: 104368
We understand. You are calling that ACSIL function. Therefore, you would want to use manual looping. At the time you want to do a full recalculation, fully recalculate the average across all chart bars and specify the Index parameter when calling the function.
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

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

Login

Login Page - Create Account