Floating-Point Division by Zero Error Message: Difference between revisions
From MultiCharts
No edit summary |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
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 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: | You can use the [[Print]] keyword to output the values utilized in the script: | ||
== Example == | == Example == | ||
Line 18: | Line 17: | ||
[[Category:FAQ]] | [[Category:FAQ]] | ||
[[Category:Studies]] |
Latest revision as of 13:23, 11 June 2024
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);