Print(M05_BWPrevious[index-1]); Print(M05_BWPrevious[index]);
Thanks Marco for reply. Yes I do check values by using Print statement, and know my first row value is Zero, hence the condition if(M05_BWPrevious[index] != 0) applied.
But still it by passes, the if condition and returns zero divide error.
on a positive note, after an hour or so, complier has started recognizing this if condition and does not give error any more. STRANGE behavior.
Thanks Marco for reply. Yes I do check values by using Print statement, and know my first row value is Zero, hence the condition if(M05_BWPrevious[index] != 0) applied.
But still it by passes, the if condition and returns zero divide error.
on a positive note, after an hour or so, complier has started recognizing this if condition and does not give error any more. STRANGE behavior.
just quick idea: maybe you need to check that the value isnt empty?
just quick idea: maybe you need to check that the value isnt empty?
Thanks Revo
yeh it make sense, will try it if the error comes again.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
strange behavior from MQL5 !!!
Even though I have a condition != 0, still code goes through the loop and returns zero divide in 'FxEAPrintDataStats.mq5' (60,78)any ideas what is wrong here !!!