double a=5; double b=0; double c=a/b;
A division by zero aborts your EA immediately. Any instruction following that will not be executed.
lippmaje:
Thanks a lot.A division by zero aborts your EA immediately. Any instruction following that will not be executed.
Is there any way to change NaN by zero?
mohammad gerami:
Thanks a lot.
Is there any way to change NaN by zero?
Thanks a lot.
Is there any way to change NaN by zero?
I don't understand this?
mohammad gerami:
Thanks a lot.
Is there any way to change NaN by zero?
Avoid the division by zero. Instead of trying to catch your mistake after your ea has already crashed, verify that b isn't zero before doing the unthinkable. Then you can assign 0 to your return value instead of trying to rediscover mathematics.
Thanks a lot.
Is there any way to change NaN by zero?
lippmaje:
I mean is there pre-defined code for changing NaN to zero
I don't understand this?
La_patates:
Avoid the division by zero. Instead of trying to catch your mistake after your ea has already crashed, verify that b isn't zero before doing the unthinkable. Then you can assign 0 to your return value instead of trying to rediscover mathematics.
Avoid the division by zero. Instead of trying to catch your mistake after your ea has already crashed, verify that b isn't zero before doing the unthinkable. Then you can assign 0 to your return value instead of trying to rediscover mathematics.
Thanks a lot
I was helpful
mohammad gerami:
I mean is there pre-defined code for changing NaN to zero
Zero is a number.
I mean is there pre-defined code for changing NaN to zero
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
Hello all
I looked on past posts here and elsewhere, tried, tried and tried but still I am stuck. Can anyone lend a hand? I want to change NaN values with zero. This is simply my code:
When I Compile no error appears. But EA does not work.
Any hint would be appreciated... Thanks!