Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 09:46:05 +0000



Post From: ACSIL -> Open and write into a text file....

[2019-12-23 05:40:19]
User553714 - Posts: 184
Hi,
I don't think there are any books on ACSIL and there is only the documentation that SC supplies; I suggest you have a repeated read of the ACSILProgrammingConcepts and the docs in general;
ACSIL Programming Concepts
Also;
Working with ACSIL Arrays and Understanding Looping

Another good source of ACSIL info is the ACS_Source folder inside the SierraChart base folder. You can open all the example studies in VisualStudio/Notepad++ and then search for the ACSIL
functions you are trying to use to see examples of their use; unfortunately I often found that many of the SC functions have not been used in any of the example studies.

Like you one of the biggest hurdles I had when I started using ACSIL is understanding the SC development environment.
SC to me is like a Windows App and continues to run and monitor message streams one of which you might think of as the studies (functions) applied to your charts.
If you have written any Windows programmes and worked with the Windows Message stream then you will probably better understand where I'm coming from.

SC executes your code/study multiple times for every chart bar period.
For example if you have a 1min chart with 20,000 minutes of data loaded then your study/code will run at least 20,000 times during a replay;
in fact it runs much more than that as you can see for yourself if you run replays and play around with that simple text file study I incl further up;
From the text file results you can see that for a 1min chart for example, during a replay the study will return and a line will be added to the text file many times for each Index.
This is because there is a LOT of time/data in 1min so although you can't generally see it displayed on a 1min chart SC is still calculating the Study Values on a sub 1min Index level and usually many times per second. To some extent the number of times the study returns will depend on the GlobalSettings>>General>>ChartUpdateIntervalInMS setting you use, the speed of your computer and size/speed of your study etc.

If you don't set UpdateAlways = 1 then SC will stop running your studies when there is no new data IE.. when there is no replay running or when you're not in live data mode.
If you do set UpdateAlways = 1 then SC continues to run your studies even without new data.
For example you would want to use UpdateAlways if you want to use many ACSIL functions on a static chart which is neither in Live mode or Replay; ASCIL Scroll functions or ACS buttons linked to your ACSIL code will only continue to work outside Live or Replay modes if UpdateAlways is true.

Hope that helps some, Goodluck...