Chart froze

 
Hello,

I had a problem with my terminal today when i checked it, the EURCHF chart completely froze up until i have restarted the terminal (closing and re-opening the chart window also helped once). The last candle was at 19:01 (yesterday), and i restarted the terminal at around noon (today). It wasn't as if the chart couldnt be scrolled, but it looked as if there was no new data coming in.

It happened once before on a demo, but well the thought at the time was that, maybe that's just what you get with a demo.

Is there any particular reason why this have happened, or any way to avoid it?
 
Papler:
Hello,

I had a problem with my terminal today when i checked it, the EURCHF chart completely froze up until i have restarted the terminal (closing and re-opening the chart window also helped once). The last candle was at 19:01 (yesterday), and i restarted the terminal at around noon (today). It wasn't as if the chart couldnt be scrolled, but it looked as if there was no new data coming in.

It happened once before on a demo, but well the thought at the time was that, maybe that's just what you get with a demo.

Is there any particular reason why this have happened, or any way to avoid it?

Was it connected to the server before u restarted it? Do u have any errors in your journal?
 
Yes, it was connected. Also, EURCHF M5 chart was showing fine, it was just the EURCHF M1.
There was another terminal connected on a different computer, same broker and same account.

I have noticed an entry in the log though (good idea to check the logs, hehe):
19:02:51 Memory handler: cannot allocate 152555788 bytes of memory
19:02:51 HistoryBase: not enough memory for 'EURCHF1' in AddTick()


Perhaps a memory leak in EA or a custom indicator?
Any way to prevent this?
(It's running on Win Xp - as a virtual machine, but there should be plenty of RAM available (1GB available, currently the terminal.exe is taking up 100mb)
 
Papler:
Yes, it was connected. Also, EURCHF M5 chart was showing fine, it was just the EURCHF M1.
There was another terminal connected on a different computer, same broker and same account.

I have noticed an entry in the log though (good idea to check the logs, hehe):
19:02:51 Memory handler: cannot allocate 152555788 bytes of memory
19:02:51 HistoryBase: not enough memory for 'EURCHF1' in AddTick()


Perhaps a memory leak in EA or a custom indicator?
Any way to prevent this?

Sounds to me like u just run out of memory. I would recommend u check your memory usage (using Task Manager, etc...).

You can also try to limit the number of bars per chart ->Tools>Options>Charts Tab:

  1. 'Max bars in chart' - lowering this would save memory. Note that the more charts u open the more memory is used -> so u can also attempt minimizing the number of opened charts.
  2. 'Max bars in history' - this just limits the number of bars to write to disk, it would only conserve disk space (usually not a problem).
 
And here is an official solution to this problem -> https://www.mql5.com/en/forum/101901
 
Ah, ok and with some searching i also found this thread: https://forum.mql4.com/5007
Ok, then Max bars in chart should be reduced a bit.

So the overall limit for the MT4's terminal.exe is 1 GB, i read.

Is there also a limit of how much a chart can use?
Is there a function in MQL4 that would tell me how much RAM is currently used? (So perhaps i can make a sort of an alert to email)
 
Papler:
Is there also a limit of how much a chart can use?

I know u can set the max number of bars to 2147483647. Maybe u can use as much of this as long as the total memory taken by Terminal is less than 1gb? Not sure...


Is there a function in MQL4 that would tell me how much RAM is currently used? (So perhaps i can make a sort of an alert to email)

Not as far as I know.
With some versions of windows u can set an email alert via perfmon, or u can use some 3rd party performance monitoring and alerting tool to do that (just google it... don't know of any particular one).
Reason: