I can not for the life of me get the global varialbe to work correctly.
Im running an efs that calls another like this:
efsExternal("strategy1.efs");
strategy1.efs does:
setGlobalValue("vAllowTrade", true);
setGlobalValue("vBias",false); (or true depending on conditions)
Then in the lines that follow efsExternal command in main script I have:
piggy = getGlobalValue("vBias");
debugPrintln(piggy);
It always returns the same value (the FIRST value the global var gets assigned to) no matter what on the output! I put a debugprintln in the external efs and its setting the global variable correctly. Is this command not run bar for bar?
I also tried using the removeglobalvalue command before setting it but that didnt help either. The calling EFS does not grab the new value when it gets changed. Everything is in function main. Frustrating..
Im running an efs that calls another like this:
efsExternal("strategy1.efs");
strategy1.efs does:
setGlobalValue("vAllowTrade", true);
setGlobalValue("vBias",false); (or true depending on conditions)
Then in the lines that follow efsExternal command in main script I have:
piggy = getGlobalValue("vBias");
debugPrintln(piggy);
It always returns the same value (the FIRST value the global var gets assigned to) no matter what on the output! I put a debugprintln in the external efs and its setting the global variable correctly. Is this command not run bar for bar?
I also tried using the removeglobalvalue command before setting it but that didnt help either. The calling EFS does not grab the new value when it gets changed. Everything is in function main. Frustrating..
Comment