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
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.