Not Enough Memory For Bar History Or Indicator

Issue

Some of the market bar history data or an indicator fails to load because the MT5 runs out of memory. An error message similar to the below is reported:


no_memory_for_history_indicator

Solution

The bar history data takes up too much memory when loaded into RAM and the charts. The MT5 application needs to be configured to keep less number of bars on the charts.

Procedure

  1. In the MT5 application menu select Tools > Options then select the Charts tab.
  2. Enter 65000 into the edit box Max bars in chart:

    maxbarshistchart
  3. Attach the EA to the chart now. If the issue is still there then go back to the previous step and enter half of the previous values. Keep repeating these two steps - halving the values every time - until the EA attaches successfully.