Is it possible to use a variable in the "varname" parm of the setGlobalValue(" varname" ) clause? By which I mean, can one construct a name based on variables and/or literals with the concatenation operator, or given that one must put it in quotes, (as are all the examples in the doco), is it then a string literal?
What I want to do is create a global variable which has the current ticker symbol embedded in it, and not hard-code the symbol name. If this EFS were then attached to several open charts, then there would be an equal number of variables in the global pool, all of them having different variable names, and so all having different values.
For example, this is what I have now:
setGlobalValue("NQTrendIsUp",TrendIsUp);
I would like to construct the first parameter, and prepend the symbol name using getSymbol(), etc, and not hard code the "NQ".
Thanks
George
What I want to do is create a global variable which has the current ticker symbol embedded in it, and not hard-code the symbol name. If this EFS were then attached to several open charts, then there would be an equal number of variables in the global pool, all of them having different variable names, and so all having different values.
For example, this is what I have now:
setGlobalValue("NQTrendIsUp",TrendIsUp);
I would like to construct the first parameter, and prepend the symbol name using getSymbol(), etc, and not hard code the "NQ".
Thanks
George
Comment