Please help with custom symbols!

 

Dear people, 

After having tried to ask in an existing old thread (https://www.mql5.com/en/forum/300712#comment_18993310) and having made a lot of experiments, I am here for asking again.

Since I did not manage to create a custom symbol from a csv file, as reported by the author of the other thread (the exact same problem) I told to myself "let's make it programmatically". And here, step by step, all my procedure. Please tell me where I am wrong (or... if is there some problem with the platform).

1. I create a new custom symbol in the terminal:

Creation of custom symbol

2. I just "take as they are" the symbol features of an existing currency. I just "rename it":

Features preserved

3. The symbol is correctly created. Please note that there is still the residual of all my trials of yesterday. There is NO WAY that I can get rid of it. I can press the "Delete custom symbol" button in the context menu, I can remove files from the ..../base/Custom directory. This "rw_AUDCAD" symbol remains there, even after restarting the terminal!

New symbol created

4. Well, then I go with my script:

//+---------------------------------------------------------------------------+
//|                                                       TestCutomeRates.mq5 |
//| Just testing                                                              |
//+---------------------------------------------------------------------------+
#property version   "1.00"

void OnStart() {
  MqlRates  destination[];
  datetime start = StringToTime("2020.01.02 00:00");
  datetime stop  = StringToTime("2020.10.30 22:00");
  int copied = CopyRates("AUDCAD", PERIOD_M1, start, stop, destination);
  printf("Number of copied bars: %i", copied);
  
  int ctr = CustomRatesUpdate("my_AUDCAD", destination);
  printf("Number of bars into new symbol: %i", ctr);
  Alert("Done");  
}
//+------------------------------------------------------------------+

5. The script works perfectly (as far as one can judge):

ScriptExecution

6. But NOTHING has happened on the terminal:

No Effetc

7. Actually, the script really worked, and the effects are visible on the file system:

FileSystem

You see that in the base/Custom/history/ folder, the my_AUDCAD directory has been created, and it even contains 18MB of HCC data. Isn't it strange? Of course in the terminal, even after res-starting, I cannot even select "my_AUDCAD" for opening a chart!


Isn't it the whole a bit strange?


I am using Build 2650 on Windows 10 (Intel 64-bit)

Bug alert! MT5 can't access imported data.
Bug alert! MT5 can't access imported data.
  • 2019.01.23
  • www.mql5.com
Hi all, I found a problem after importing a huge tick data file (more than 16 Gb) from TDS2 to the metaquotes MT5 platform...
 

Just to be clear: certainly I am not interested in importing AUDCAD quotes from the standard symbol to my own copy. I worked the whole day yesterady for trying to import my own data. Since it did not work I created this example just to show what I think is a strange behavior of the platform. 

1. Get NATIVE MT5 data -->

2. Populate with them (no error possible in data format and whatsoever, isn't it?) a custom symbol.

Any hint?

 
Posted on the Russian forum. Let's see if any developer takes a look at it.
 

Answer from Slava, the "big guy" in the Russian forum (and it is good for everybody with this same problem):


Just press the "Request" button in the user interface (the figure above with "Empty!!!": and the data are there.

I am now asking whether data are available for being used programmatically also if you don't have user's interaction (i.e. without pushing the "Request" button). I will post updates here. And I also asked why it is not possible to load data directly from the interface from a csv file...

 

For completing the information:

1. Custom Symbols, if loaded programmatically, are immediately available for further programmatic processing, even without pressing the "Request" button.

2. When you load data from a csv through the graphical interface, quotes become available just after DOUBLE-CLICKING on the created custom symbol.

3. To delete previously created Custom Symbols, one has to "hide" then with the button at the bottom of the Custom Symbols interface. Just THEN the "Delete Custom System" command in the context menu (mouse right click) becomes effective. This is an undocumented feature of MetaTrader 5. I already asked the courtesy of inserting this information in the user manual (where currently there is no mention of it).


The Russian forum rocks!


I hope that this information can be retrieved with a search, in the future, by anybody having problems with Custom Symbols.

 
Fab:
...

I hope that this information can be retrieved with a search, in the future, by anybody having problems with Custom Symbols.

Yes, I updated this key thread with your thread included: post  

How to Start with Metatrader 5
How to Start with Metatrader 5
  • 2017.04.07
  • www.mql5.com
I decided to create this thread to help to myself and to the others to start with Metatrader 5...