Period converters don't convert when symbol has ".." at the end

 

I'm using MT4 and have tried several period converters. All seem to work fine as long as the symol is for example EURUSD or EURUSD+
Now that I've switched to a pro account, the symbols my broker gives me end with .. (EURUSD..) and it won't convert the timeframes anymore. I'm a little desperate as I need custom timeframes that are updated instantly for my trading. I was using the P4L periodcon 509 in the past and was very happy with it. Maybe someone here knows a period converter that can handle the ".." in the symbol, or is it possible to recode the P4L converter that I have?

Thanks!

Chris

< ex4 file removed >

 
If you want any suggestions for modifying code you must attach the mq file.
 
Keith Watford:
If you want any suggestions for modifying code you must attach the mq file.

Hello Keith,

Thanks for your reply! I attached the mq file as requested.

When I try to convert a standard timeframe, it tells me "invalid filename for FileOpenHistory function"
For example, a standard 1 minute timeframe is saved as EURUSD..1.hst and it somehow won't create EURUSD..2.hst for a 2 minute timeframe.
In my old account it was EURUSD+1.hst and it had no problems creating EURUSD+2.hst

As I don't know how to code and have no idea what to look for, I sure hope you can help me with this.

Thanks!

Chris

Files:
 
In Build 600 and Higher (17.02.2014) The format of history files was changed. That code won't work.
 
whroeder1:
In Build 600 and Higher (17.02.2014) The format of history files was changed. That code won't work.

Thanks for your reply. Found out that the mq file I have is the old converter, and from the new one I only have the ex4 file... guess that won't work :(

I do have a different converter that works with the current version of Metatrader that also has issues with ".." in the symbol. On top of that it delays the update on the offline charts. Therefore I liked the P4L converter more as it was updated instantly... I have attached the mq file, I hope this one does the trick. I really appreciate the help!

Thanks!

Chris

Files:
 
Anyone?
 

There's no way I could probably test it but double dots are not a valid file name so I'm guessing if you replaced the dots with underscores before the file is opened that would fix it. Just a guess. 

StringReplace(c_symbol, ".", "_");
 
nicholi shen:

There's no way I could probably test it but double dots are not a valid file name so I'm guessing if you replaced the dots with underscores before the file is opened that would fix it. Just a guess. 

Thank you so much for your help! It does convert now and creates an offline chart like EURUSD_2.hst :)
But unfortunatelly I won't be able to trade from this chart, as it isn't updating anymore. I guess that's because the symbol name has changed and my broker can't communicate with that? Is there a way to get it updated anyway (best in real time and no delays)? Also wondering that if double dots are not valid, how is it possible that a standard 1 minute timeframe is saved as EURUSD..1.hst?

 
i am looking P4L PeriodCon 509 for meta 5 can you help please?
Reason: