Difference between revisions of "Floating-Point Division by Zero Error Message"

From MultiCharts
Jump to navigation Jump to search
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Floating-Point Division by Zero Error Message==
+
This message may pop up in MultiCharts and/or portfolio Trader during your study calculation. Floating point error means that there is a division by a zero value in your code. It can be a variable, input, or a function in use that returns zero value. You need to identify this variable/input/function and make sure that the returned value is not zero.
  
This error message may pop up in MultiCharts after you've applied a study to your chart. Floating point error means that there is a division by a variable in the code and this variable's value is zero. You need to identify this variable and fix it or to make sure that the variables value is not zero in the code.
+
You can use the [[Print]] keyword to output the values utilized in the script:
  
To do this please use [[Print]] keyword to check value of the variables used it the script.
+
== Example ==
 
 
Alternatively, you can deduce it using the following piece of code
 
 
 
== Examples ==
 
  
 
<syntaxhighlight>
 
<syntaxhighlight>

Latest revision as of 10:49, 27 June 2016

This message may pop up in MultiCharts and/or portfolio Trader during your study calculation. Floating point error means that there is a division by a zero value in your code. It can be a variable, input, or a function in use that returns zero value. You need to identify this variable/input/function and make sure that the returned value is not zero.

You can use the Print keyword to output the values utilized in the script:

Example

var: vrs(0);

if vrs=0 then raiseruntimeerror("!!!alarm vrs=0");

if vrs<>0 then
	plot1(close/vrs)
else
	plot1(0);