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

From MultiCharts
Jump to navigation Jump to search
(Created page with "==Floating-Point Division by Zero Error Message== This error message may pop up in MultiCharts after you've applied a study and it has been calculated. Floating point error m...")
 
Line 1: Line 1:
 
==Floating-Point Division by Zero Error Message==
 
==Floating-Point Division by Zero Error Message==
  
This error message may pop up in MultiCharts after you've applied a study and it has been calculated.
+
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.  
Floating point error means that there is a division by variable in the code and the variable 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.  
 
  
To do this please use [[Print]] keyword for checking values used it the script.
+
To do this please use [[Print]] keyword to check value of the variables used it the script.
  
Or you can deduce it using the following piece of code
+
Alternatively, you can deduce it using the following piece of code
  
 
== Examples ==
 
== Examples ==

Revision as of 12:56, 31 August 2012

Floating-Point Division by Zero Error Message

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.

To do this please use Print keyword to check value of the variables used it the script.

Alternatively, you can deduce it using the following piece of code

Examples

var: vrs(0);

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

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