Where does MT4 store chart objects?

To add comments, please log in or register
whoowl
16
whoowl  

I had a chart with many trend lines I had drawn.

I deleted that chart by mistake.

I tried to 'undelete' the chart, but it's not even on the list of deleted charts so I can't recover it.

I have a backup of the entire \\Application Data\MetaQuotes\Terminal\ folder and I thought I could restore the specific file or folder where it would be stored, but I can't find it. Can someone please help me with that?

TIA

William Roeder
20214
William Roeder  

It's not a single file. Restore everything or forget it.

Do you have Tools → Options (Control+O) → Charts → Save deleted charts to reopen checked?

JC
1646
JC  
whoowl:

I have a backup of the entire \\Application Data\MetaQuotes\Terminal\ folder and I thought I could restore the specific file or folder where it would be stored, but I can't find it. Can someone please help me with that?

It's very opaque.

The File / Open Deleted list corresponds to entries in the directory history\deleted.

But the way that MT4 stores the data means that it only records the most recently deleted combination of each symbol + timeframe. If you open and then close/delete a chart for, say, EURUSD H1, and then open and close/delete another chart for EURUSD H1, then the first one isn't recoverable. It's overwritten by the second closed/deleted chart.

whoowl
16
whoowl  
William Roeder:

It's not a single file. Restore everything or forget it.

Do you have Tools → Options (Control+O) → Charts → Save deleted charts to reopen checked?

Yes, I do have that option enabled. And I also tried restoring everything and it didn't work.
JC
1646
JC  
JC:

But the way that MT4 stores the data means that it only records the most recently deleted combination of each symbol + timeframe. If you open and then close/delete a chart for, say, EURUSD H1, and then open and close/delete another chart for EURUSD H1, then the first one isn't recoverable. It's overwritten by the second closed/deleted chart.

... But this does mean that you can use File / Open Deleted as a type of template mechanism which doesn't otherwise exist in MT4. For example, you can do the following:

  • Open a chart and set up indicators, objects etc
  • Close the chart
  • Go into the history\deleted directory
  • Rename the file from something like EURUSD-H1.tpl to MySavedChart.tpl
  • Close and restart MT4 (because MT4 only re-reads the history\deleted directory on start-up)

File / Open Deleted will now include MySavedChart (and this will never get overridden/replaced because MT4 won't create a file of that name).

So, what you've got is a shortcut for opening a chart for a specific combination of symbol + timeframe, with indicators, objects etc preloaded onto the chart. It can be a more efficient alternative to opening a new chart for a symbol, changing the timeframe, and then applying a saved template to that chart. It's sort of halfway between a Profile and a Template.

To add comments, please log in or register