Learning and writing together in MQL5 - page 29

 

Okay. I got it all figured out. I've done a post-production analysis, figured out what's what and I think I've got it all figured out.

Now tell me, when I insert this line into my Expert Advisor.

#include <Trade\Trade.mqh>

why I get this error:

can't open "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\include\Trade\Trade.mph" include file CandleH4_5.mq5 10 11

I have Windows Vista. Apparently I either don't have this library or it has to be somewhere else?

 
Khomtchenko:

Okay. I got it all figured out. I've done a per-product analysis, figured out what's what and I think I've got it all figured out.

Now tell me, when I insert this line into my Expert Advisor.

why I get this error:

can't open "C:\Users\user\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\include\Trade\Trade.mph" include file CandleH4_5.mq5 10 11

I have Windows Vista. I guess I either don't have such a library or it should be in some other place?

The file must be located in .\MQL5\Include\Trade.

Try to run the terminal with the /portable key, it might help...

 

Ihave theTrade.mph fileat ... \MQL5\Include\Trade and evenC:\Users\user\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\include\Trade\

And now for another question: How does

запустить терминал с ключом /portable

?
 
Khomtchenko:
?

in the shortcut properties - where the path to the object is, type terminal.exe /portable after it

or if you run it under totalcommander - type terminal.exe /portable in the launcher

 
Wind does not allow you to change the path to the object - says no such object was found
 
How about adding all sorts of classes from the Trade.mph file to the EA text so that they are not referenced?
 
Khomtchenko:
How about adding all sorts of classes from the Trade.mph file to the text of the EA so that they are not referenced ?
have you tried it yet ?
 

There's plenty of Inkludes out there, too.

#include <Object.mqh>

#include "SymbolInfo.mqh"

... 
А чем отличается #include <в таких скобках> от #include "в ковычках"?
 
Khomtchenko:
А чем отличается #include <в таких скобках> от #include "в ковычках"?
What is the difference between questions on the forum and questions in the search box of the language guide?
 
Khomtchenko:


"Angle brackets indicate that the .mqh file will be taken from the default directory (usually terminal_directory\MQL5\Include). The current directory is not visible.

If the file name is enclosed in inverted commas, it is searched in the current directory (which contains the main source file ). The default directory is not visible."

Refer to MQL5 help.