
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I know this topic is closed ... but just wanted to post this tip for the future readers.
If you are getting "zero divide" error in expert log then do the following:
1. Open mq4 file in editor
2. Search for "/"
3. Confirm the denominator is not zero (for manually entered using extern etc) .... or if the denominator is a calculated value then make sure that this is normalized
4. after normalizing the denominator, 99% chance is there that zero divide error would have gone.
4. You can normalize any value with following function
An even better tip . . . . get into the habit of using spaces, so instead of / use space / space and then instead os searching for / and finding all your comments . . . search for space / space and find just the divisions in your code.
Zero is a special case double, there is no need to Normalize . . . 0.0 == 0
I know this topic is closed ... but just wanted to post this tip for the future readers.
If you are getting "zero divide" error in expert log then do the following:
1. Open mq4 file in editor
2. Search for "/"
3. Confirm the denominator is not zero (for manually entered using extern etc) .... or if the denominator is a calculated value then make sure that this is normalized
4. after normalizing the denominator, 99% chance is there that zero divide error would have gone.
4. You can normalize any value with following function
What are you talking about?
normalized zero is still zero.