Topic: Div by 0 on EA start?

I'm running into a divide by 0 error when one of my EA's initializes.  So far that's the only one with an issue so not sure what make it special.  I preloaded all the data the broker has for the symbol/timeframe(s) and it's still not happy so not sure what to look at here's a screenshot:

https://gyazo.com/c5039e84ce45a3075eb4ed6e425a2a56

Attaching the strategy and ea code...

Post's attachments

GBPUSD M1 T1.xml 13.71 kb, 4 downloads since 2016-07-27 

You don't have the permssions to download the attachments of this post.

Re: Div by 0 on EA start?

And the MQL code...

Post's attachments

GBPUSD M1 T1.mq4 252.53 kb, 3 downloads since 2016-07-27 

You don't have the permssions to download the attachments of this post.

Re: Div by 0 on EA start?

Hello Gizmo,

I cannot reproduce the bug. I tested the attached mq4 file without problem. I also exported the strategy to MT5 and it also works.

Do you still have problems with it?

http://s32.postimg.org/jxll9gw6d/screenshot_1945.png

Re: Div by 0 on EA start?

I tried it again and got the same issue.... dug a bit deeper though and figured out what was going on.  The strategy was generated against GBPUSD M1.  It also had a longer timeframe RSI slot which was based on GBPUSD M5.  The broker I was running it on decided to name the symbol "GBPUSDi" so for the primary timeframe that switched over fine however the longer timeframe was still looking at GBPUSD (without the "i".) 

I hand hacked the mql code as a test and it came up as expected.