How to remove bug?

 

Mt Indicator  that normally shows Data in a a tabular form, as attached.  Now, its stopped working. Instead of showing me numeric values as you see in the Image, now it shows " -NAN" and "-INF" in the cells.


Any suggestiojs how to fx this?

Files:
Capture2.JPG  99 kb
 
You have to provide the source code.

source code means mq5 file.
 
Kailash Bai Mina #:
You have to provide the source code.

source code means mq5 file.

I had exactly the same thing once. I couldn't figure out why it happened.

This was a weekend and as soon as new ticks came in on Monday, it resolved itself.

As I couldn't replicate it, I didn't bother to report it.

 
Keith Watford #:

I had exactly the same thing once. I couldn't figure out why it happened.

This was a weekend and as soon as new ticks came in on Monday, it resolved itself.

As I couldn't replicate it, I didn't bother to report it.

This is due to MT5 architecture. On multi-symbols code specially (but it can also happen on 1 symbol multi-timeframe), due to the asynchronous nature of MT5, some functions can return errors. And as there is no new tick the indicator can't calculate its stuff correctly.

The MQ "solution" is to simulate tick with:
ChartSetSymbolPeriod(0,NULL,0); // same as ChartSetSymbolPeriod(0,_Symbol,_Period);

However it's like using a hammer to kill a fly, it will send a tick to ALL indicator running on the considered _Symbol (even on other charts with the same symbol). So if you have one indicator it will be ok, if you have several indicators on a chart or on several charts, it will lead to a mess as all instances with start to send this command.

It's possible to deal with that but it can be tricky depending of the complexity of the indicator. It's only worth it if you really need to have your indicator(s) working on the WE (and if you know how to do it), otherwise, as you did, just wait the market opening.