Announcement

Collapse
No announcement yet.

setGlobalValue not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • setGlobalValue not working

    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..

  • #2
    Resolved

    AHh Chris Kryza just informed me that globalVariables only work in real time. This is why they are not working on any of my back test studies. Much appreicated! I would of been at it all night.

    G

    Comment

    Working...
    X