You can use global variables to do this (but only in REALTIME) or you can use TEXT FILES to combine historical results between two or more EFS files/scripts.
Using text files is a bit more work, but if you are trying to combine analysis systems into a single backtesting system, then it's the only real solution..
On second thought, you could have the "child" analysis models build an array of results, then pass that array to the "parent" efs (using global variables) for use in backtesting. The result will be the same as using a text file, but the method would be different.
Is there a way to set the order that Advanced Charts are processed (particularly so I can make sure the global variable is set from the correct chart before being used by the other chart).
Nope. I have code that requires two charts and there is no way to set the order in which efs is loaded/run in esignal. When I reload esignal, I typically have to RELOAD the final script to get the systems to operate properly.
I believe I have just found a way to do this. I am new to scripting eSignal, but I have some javascript experience. For your second EFS script, add the following "if" statement in your main() block:
function main() {
if (getGlobalValue("id")) {
your code here
}
}
Comment