I'm trying to use a variable to put in for another symbol and time frame in a stochD study. The following works if I hard code it:
vStoch10 = stochD(6, 3, 3, sym("IBM, 10"));
but if I try to use a variable
var sym_time = ""\sym(\"IBM,10\")\""
which puts in the sym_time variable
sym("IBM,10")
so the following doesn't work
vStoch10 = stochD(6, 3, 3, sym_time);
with no error message. I've tried just to put in the "IBM,10"
vStoch10 = stochD(6, 3, 3, sym(sym_time))
again without any error message, it just gives bad data. Am I doing something wrong?
Thanks,
Mark
vStoch10 = stochD(6, 3, 3, sym("IBM, 10"));
but if I try to use a variable
var sym_time = ""\sym(\"IBM,10\")\""
which puts in the sym_time variable
sym("IBM,10")
so the following doesn't work
vStoch10 = stochD(6, 3, 3, sym_time);
with no error message. I've tried just to put in the "IBM,10"
vStoch10 = stochD(6, 3, 3, sym(sym_time))
again without any error message, it just gives bad data. Am I doing something wrong?
Thanks,
Mark
Comment