how to read MetaQuotes\Terminal\xxx\bases\xxx-Server\symbols\symbols-xxx.dat in MT5

 

Hello

My main goal is to read and analyze all the symbols that are offered by the trading server and more importantly all the properties related to them. (i.e ISIN, Name, Fullname, etc.) 

in short everything that the Symbols dialog has to offer like so...

https://imgur.com/Uus2voN

and so far Im pretty sure that it has sth to do with the contents of the mentioned *.dat file but I havent thus far been able to figure out how can I read its contents. Can anyone help me with this?



Also I should mention that I did some research in the forums and the closest thing I came across was exporting the list of symbols to a .txt file using the following script which doesnt help that much cause I need much more details but by the looks of it there isnt any function for such operation in MQL5.


//+------------------------------------------------------------------+
//|                                                            a.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   int h = FileOpen("test.csv", FILE_WRITE|FILE_UNICODE|FILE_CSV);
   if(h==INVALID_HANDLE){
         Alert("Error opening file");
         return;
      }
   int x;
   int total = SymbolsTotal(false);
   for(x = 0; x < total; x++ ){
      
      FileWrite(h,
      SymbolName(
         x,          // number in the list
         false     // true - only symbols in MarketWatch
         ));
      }
  }
//+------------------------------------------------------------------+
Imgur
  • 2020.05.07
  • imgur.com
Post with 0 votes and 0 views.
 
pejhan:

Hello

My main goal is to read and analyze all the symbols that are offered by the trading server and more importantly all the properties related to them. (i.e ISIN, Name, Fullname, etc.) 

in short everything that the Symbols dialog has to offer like so...

https://imgur.com/Uus2voN

and so far Im pretty sure that it has sth to do with the contents of the mentioned *.dat file but I havent thus far been able to figure out how can I read its contents. Can anyone help me with this?



Also I should mention that I did some research in the forums and the closest thing I came across was exporting the list of symbols to a .txt file using the following script which doesnt help that much cause I need much more details but by the looks of it there isnt any function for such operation in MQL5.


Most of the mt5 files found in the folders are encypted. 

Don't do that. Use this method...

Place these two files in the same mt5 folder then compile the mt5 in metaeditor and run it on chart. 

 
Nelson Wanyama:

Most of the mt5 files found in the folders are encypted. 

Don't do that. Use this method...

Place these two files in the same mt5 folder then compile the mt5 in metaeditor and run it on chart. 

Nifty trick. That helps me a ton! Thank you.

I'll spend some time investigating the script a bit further, as Im new to MQL and all things related. Ill try to loop over all possible Symbols and extract all the info to a text or better an xlsx file for further analysis via python. 

But I gotta confess Im pretty bummed with the encryption. I felt sure that if it could somehow become readable it could help out a lot.

 
pejhan:

Nifty trick. That helps me a ton! Thank you.

I'll spend some time investigating the script a bit further, as Im new to MQL and all things related. Ill try to loop over all possible Symbols and extract all the info to a text or better an xlsx file for further analysis via python. 

But I gotta confess Im pretty bummed with the encryption. I felt sure that if it could somehow become readable it could help out a lot.

Quite unfortunate. Right?😂