I have a program that gets the current value of the 34 period exponential EMA. I want the value reported in the return line at the end of the program.
I have tried two different return statements :
return("34="+v34EMA);
return("34="+v34EMA.toFixed(3));
The first one works perfectly. But when I try to truncate the value to 3 decimal places using the.toFixed thingie, then I get an error message saying that the variable "v34EMA" "has no properties." I have no clue what that means. It's a simple real number, and I only want it to report to 3 decimal places.
How do I get this value to report to only 3 decimal places?
I have tried two different return statements :
return("34="+v34EMA);
return("34="+v34EMA.toFixed(3));
The first one works perfectly. But when I try to truncate the value to 3 decimal places using the.toFixed thingie, then I get an error message saying that the variable "v34EMA" "has no properties." I have no clue what that means. It's a simple real number, and I only want it to report to 3 decimal places.
How do I get this value to report to only 3 decimal places?
Comment