Download MetaTrader 5

FileOpenHistory(

To add comments, please log in or register
Yochanan Gerbi
608
Yochanan Gerbi  

Hello freinds,

 

At MQL4 I hade FileOpenHistory(...),

and I changed it to:

FileOpen(C:\Program Files\Fxglobe ECN Metatrader 5.0\Bases\GoForex-Demo\history\...),

 

The compiler's response is:

many of: '\' - illegal escape sequence

 

What should I do:
 

Pawel Wojnarowski
686
Pawel Wojnarowski  
crossy:

Hello freinds,

 

At MQL4 I hade FileOpenHistory(...),

and I changed it to:

FileOpen(C:\Program Files\Fxglobe ECN Metatrader 5.0\Bases\GoForex-Demo\history\...),

 

The compiler's response is:

many of: '\' - illegal escape sequence

 

What should I do:
 

 

Try replacing all \ with \\.
Slava
Moderator
6924
Slava  
crossy:

 

What should I do:

You should read documentation https://www.mql5.com/en/docs/files
Documentation on MQL5: File Functions
  • www.mql5.com
File Functions - Documentation on MQL5
Pawel Wojnarowski
686
Pawel Wojnarowski  
stringo:
You should read documentation https://www.mql5.com/en/docs/files
crossy: just like stringo has suggested, check the documentation. In https://www.mql5.com/en/docs/files/fileopen you can see an example code where you have \\ in the paths, not \.
Documentation on MQL5: File Functions / FileOpen
  • www.mql5.com
File Functions / FileOpen - Documentation on MQL5
Ilyas
1206
Ilyas  
And don`t forget double quotes

Yochanan Gerbi
608
Yochanan Gerbi  
mql5:
And don`t forget double quotes

Thank you freinds.
To add comments, please log in or register