Zero divide - page 2

 

Zero Divide WCCI Panel Hearth

Any Idea?:..

 

...

Since it is a decompiled code, no code posting, but do it like this :

Line 241 replace

ld_44 = 6.0 * ld_20 / (LSMAPeriod * (LSMAPeriod + 1));

[/php]with :

if ((LSMAPeriod * (LSMAPeriod + 1))!=0)

ld_44 = 6.0 * ld_20 / (LSMAPeriod * (LSMAPeriod + 1));

else ld_44 = 0.0;

[/php]Also, wherever you find in the code "/ gd_216" replace it with zero condition checking (it occurs on 6-7 places - here is one example how to replace) :

this :

[php] gd_392 = MathRound((l_ima_88 - l_iclose_72) / gd_216);

should be this :

[php] if (gd_216!=0)

gd_392 = MathRound((l_ima_88 - l_iclose_72) / gd_216);

else gd_392 = 0;

regards

mladen

quest:
Any Idea?:..
 

WCCI PanelHeart

I do not know what to say, really thanks

 

Help me fix zero divide problem

Hi there, can someone fix the zero divide error for my ea that link neuroshell and mt4. when it want to make a trade...then the zero divide problem occur and please check whether stop loss,take profit and trailing stop will create a zero divide problem also...thanks in advance...your help is much more appreciated...

Files:
mtfeed.mq4  33 kb
 

Fixing zero divide error

Need help in fixing the Moving-Moving indicator (originally posted in this thread: https://www.mql5.com/en/forum/173001/page2).

As I'm newby in coding, my efforts turned out to be noneffective, what's even worse the author of this indi has left this forum, so no way for me to contact him...

About the problem - zero divide error, I tried it with 2 different brokers, works only with one if candle parameter is set >25, and that is only on D chart, lower TFs generate only the error.

It will be greatly appreciated if a more skilled coder can help fixing this problem.

Files:
 

Hi all,

Its been along time since ive been around.

Wondering if someone could help me update my EA.

Getting Zero Divide.

Thanks!

Spider~

Files:
averagejoe.mq4  10 kb
 
Spider4896:
Hi all,

Its been along time since ive been around.

Wondering if someone could help me update my EA.

Getting Zero Divide.

Thanks!

Spider~

Spider

No more zero divide error

Happy trading

Files:
 

Hello traders,

in my case the message "zero devide in" has appeared while running an EA in demo.

As soon as I attached the EA to the chart, it stayed 1 second attached and then went away from the chart.

I solved by adding in the MT5 Market windows more than 20 Pairs (at the beginning there were only 4 pairs available, now 28, as the image shows.)

The EA now doens't go away from the chart, it opens multiple positions on multi-pairs.

happy trading :-)

 
Mladen Rakic:

...

Zero divide error is exclusively a coding error. Metatrader does not provide a trap (or rather, that message is the trap, and since by definition divide by zero yields to undefined, they chose the terminate the code execution in such cases) for such errors, so if not dealt with within the code it will happen, sooner or later

Exactly.