Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 21:06:31 +0000



ACSIL - How a study code can wait...?

View Count: 1539

[2014-07-21 14:45:44]
AC94882 - Posts: 8
Hello,
I am running a study that runs every bar closes (like every study).
In this case, the study needs to wait few seconds, before execution, because it has to get some data from an external text file.

The Reading from the file is working, but if i am using the C++ Sleep() function, the whole chart is stuck!!.

I have other studies that must run just after bar is closing.

Q:

1. what is the best way for doing that?
2. C++ Thread is having a compelation error for me. Is it?
3. Is where is a configurablility way, to tell a study to run only after other study finished?, or after "X" seconds (through the Study Settings)?

Hope to hear from you soon,
Thanks, Ariel
[2014-07-21 14:50:17]
ejtrader - Posts: 688
AC94882 - the following parameters are likely to help in your case.

in sc.SetDefaults section:
sc.CalculationPrecedence = STD_PREC_LEVEL; -- For master study
sc.CalculationPrecedence = LOW_PREC_LEVEL; -- For Slave study
[2014-07-21 18:39:28]
AC94882 - Posts: 8
Support, Thanks!
Do you have a way to postponed the study from running, in few seconds (variable), and not stop the whole chart updates?

So the chart will be updated by the rest of the studies, and a specific study will be executed after a while...

Ariel
[2014-07-21 20:42:20]
Sierra Chart Engineering - Posts: 104368
Post #2 was not from Support.

This is our answer:


We recommend setting your study to update always:
http://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scUpdateAlways

This way, your study is continuously called and can take the necessary action at any time without having to rely on new market data.

For any study that needs to be calculated after other studies, set them to have a low calculation Precedence:

http://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scCalculationPrecedence
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
Date Time Of Last Edit: 2014-07-21 20:43:00

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

Login

Login Page - Create Account