Hello
If you write (for example) #include <Trade/Trade.mqh> your EA automatically find the Trade.mqh file on the include folder of MetaTrader5
Strange ... that's work great for me ...
You can use the function TerminalInfoString(TERMINAL_DATA_PATH) to return string of the data path and add "\\MQL5\\Include" after.
Strange ... that's work great for me ...
You can use the function TerminalInfoString(TERMINAL_DATA_PATH) to return string of the data path and add "\\MQL5\\Include" after.
Thanks. I've tried running TerminalInfoString(TERMINAL_DATA_PATH) and it has just returned c:\Program Files again
MetaTrader on Mac works with a Windows emulation from Wine ...
You talk about "ProgramFiles" but the in windows, "Includes" folder is on "C:\Users\Login\AppData\Roaming\MetaQuotes\Terminal\".
What is the path openned when you clic on "Open Data folder" in MT5 Files Menu ?
MetaTrader on Mac works with a Windows emulation from Wine ...
You talk about "ProgramFiles" but the in windows, "Includes" folder is on "C:\Users\Login\AppData\Roaming\MetaQuotes\Terminal\".
What is the path openned when you clic on "Open Data folder" in MT5 Files Menu ?
It doesn't give the path in the data window. It just says MetaTrader 4.(I'm on MT4 by the way.)
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. - He said File (Alt+F) → Open Data Folder (D) and verify you put it in the correct location (MQL4/Include). Not the Data Window (Control+D)
-
Why did you post your MT4 question in the MT5 General section instead of the MQL4 section, (bottom of the Root page)?
General rules and best pratices of the Forum. - General - MQL5 programming forum? (2017)
Next time, post in the correct place. The moderators will likely move this thread there soon. - He said File (Alt+F) → Open Data Folder (D) and verify you put it in the correct location (MQL4/Include). Not the Data Window (Control+D)
Yes William it is in the correct location: the file can be viewed by opening File/Open Data Folder and is in the "Include" folder. It is how to specify the path in the EA which is the issue and not the folder because I am using a Mac.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Does anybody know how to code #include folder references in eas on a Mac? I have specified the entire location with forward slashes but it won't compile because it is looking for c:\Program Files which of course doesn't exist on a Mac.
Thanks
Phil