{Exception}Floating-Point division by zero, signal only. [SOLVED]
-
- Posts: 53
- Joined: 04 Jan 2008
- Has thanked: 21 times
- Been thanked: 3 times
{Exception}Floating-Point division by zero, signal only.
I am getting an {Exception} "Floating-point division by zero" when applying one particular function in a strategy to a chart but have no problem at all when this function is used in a indicator and plotted. I don't think the coding is the main problem and am hoping someone might be able to suggest what else might possibly cause this. All divisions are tucked into Iff statements. Thanks in advance.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: {Exception}Floating-Point division by zero, signal only. [SOLVED]
You can insert a PRINT statement before your division.I am getting an {Exception} "Floating-point division by zero" when applying one particular function in a strategy to a chart but have no problem at all when this function is used in a indicator and plotted. I don't think the coding is the main problem and am hoping someone might be able to suggest what else might possibly cause this. All divisions are tucked into Iff statements. Thanks in advance.
You can print out the denominator before your division.