I'm having a little trouble with global variables and can't seem to find an answer in the boards.
eval("var top"+getSymbol());
setGlobalValue (eval("top"+getSymbol()),xHigh);
eval("var btm"+getSymbol());
setGlobalValue (eval("btm"+getSymbol()),xLow);
These statements seem to work fine, and all variables are defined and have values. When I try to reference the global variables in another script (same chart for the moment), I get "undefined."
I am testing this after hours using 1-minute charts, but it is intended to run during the day. How do I reference the global variables in separate scripts? Any help will be appreciated. Thanks.
eval("var top"+getSymbol());
setGlobalValue (eval("top"+getSymbol()),xHigh);
eval("var btm"+getSymbol());
setGlobalValue (eval("btm"+getSymbol()),xLow);
These statements seem to work fine, and all variables are defined and have values. When I try to reference the global variables in another script (same chart for the moment), I get "undefined."
I am testing this after hours using 1-minute charts, but it is intended to run during the day. How do I reference the global variables in separate scripts? Any help will be appreciated. Thanks.
Comment