Experts Tab "zero divide", Help please to clarify what this issue means?

To add comments, please log in or register
Michael Green
395
Michael Green  

Hi I get this error message when running my EA in the Experts Tab:

2017.11.14 08:00:00.419 EURAUD.Admiral.Trend.(i).28_10_2017 EURAUD,H1: zero divide in 'EURAUD.Admiral.Trend.(i).28_10_2017.mq4' (558,44)

Everything compiles ok in the editor.

Can someone please clarify what this error message means ? and what is the fix?

Regards Mike

Snelle Moda
660
Snelle Moda  

Hi

A value in your indicator is divided by zero. This is a fatal error in C++ or MQL5

You can fix this by correcting the part of the code.

Example: 

if(your_value > 0)

{

execute code

      Do the division

}

To add comments, please log in or register