Login Page - Create Account

Support Board


Date/Time: Wed, 01 May 2024 23:24:36 +0000



Re: Help using sc.DaysToLoadInChart

View Count: 815

[2015-02-01 18:53:34]
Trade Nice - Posts: 75
I have programmed using ACSIL so that, for example, if the program recognizes that the chart has been changed to a 5min Bar Period, the program sets sc.DaysToLoadInChart = 100, or if the program recognizes that the chart has been set to a 15min Bar Period, the program sets sc.DaysToLoadInChart = 200. I use sc.SecondsPerBar to check the Bar Period.

It does work, but not as I had hoped. The problem as far as I can figure out is that changing the Bar Period causes a Reload, but the new sc.DaysToLoadInChart value (that I set in the code prior to sc.Index == 0) is after the Reload has started, and so does not affect that Reload ( it uses the Days to Load set at the time the Bar Period was changed).

However, after the Reload caused by changing the Bar Period has completed, SC does recognize that the sc.DaysToLoadInChart had been changed and so SC then automatically starts another Reload which then utilizes the new sc.DaysToLoadInChart value.

Is there a way to force SC to just do one Reload that uses the new sc.DaysToLoadInChart value? Perhaps a command after I set the new sc.DaysToLoadInChart that terminates that Reload and starts another Reload which would then have the correct Bar Period and sc.DaysToLoadInChart value?






[2015-02-01 19:17:13]
Sierra Chart Engineering - Posts: 104368
What you are asking is not possible because it is not until after the first chart reload completes, that your code is then changing sc.DaysToLoadInChart and that will cause another reload.

You have to make the changes you want all at once within the study function to cause one reload.
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
[2015-02-01 19:46:34]
Trade Nice - Posts: 75
Thank you, please help me with terminology/operation.

Changing the Bar Period manually causes a Reload, and does that Reload finish prior to my ASCIL code running?







[2015-02-01 20:03:22]
Sierra Chart Engineering - Posts: 104368
The study function is not going to be called until the reload completes.
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