Login Page - Create Account

Support Board


Date/Time: Sat, 11 Jan 2025 22:57:06 +0000



Post From: ACSIL/Most efficient way to...

[2017-01-05 20:47:28]
Merlin - Posts: 83
Are you talking about your own ACSIL studies?
If so, I would think you could accomplish this using a global variable, as documented here:
http://www.sierrachart.com/index.php?page=doc/ACSILProgrammingConcepts.html#GlobalVariables .

Note - I haven't tested this!
But if I wanted to accomplish what you're suggesting, this is what I would try:
Have study A accept the periodicity value as an Input, and store it in the global variable.
Then have studies B and C get their periodicity by reading the global variable, instead of as an input.
When study A changes the value of the global variable, it can use sc.FlagFullRecalculate to cause all the studies on the chart to recalculate.
It has to test whether this is really a new value by comparing the current vs. new values, and only trigger the recalc for genuine new values, otherwise you could get an endless loop.
Also note the warning that global variables only work with sc.FreeDLL set to 0.

Another approach would be to add a subgraph to Study A that just outputs the current period value, and have studies B and C read that subgraph.
One of these two approaches should definitely work. :-)
Good luck!
Date Time Of Last Edit: 2017-01-05 20:48:00