Questions from Beginners MQL5 MT5 MetaTrader 5 - page 617
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello!
MT4 has a command if (IsTesting()
Is there an analogue in MT5?
I would like to ask you a couple of questions, thank you.
P.S. And another thing - in normal mode my Expert Advisor writes a log file, but if I run it in tester in MT5, I don't see it in the usual Tester folder, as it was in M4.
Choose what you need:
ENUM_MQL_INFO_INTEGER
Identifier
Description
Property type
MQL_MEMORY_LIMIT
Maximum possible size of dynamic memory for an MQL5 program in MB
int
MQL_MEMORY_USED
How much memory an MQL5 program uses in MB
int
MQL_PROGRAM_TYPE
Type of mql5-program
ENUM_PROGRAM_TYPE
MQL_DLLS_ALLOWED
Permission to use the DLL forthis running program.
bool
MQL_TRADE_ALLOWED
Permissionto trade forthis running program
bool
MQL_SIGNALS_ALLOWED
Allowto work with signals ofthis program
bool
MQL_DEBUG
Sign of a running program in debug mode
bool
MQL_PROFILER
Sign of running a program in the code profiling mode
bool
MQL_TESTER
Sign of running a program in the tester
bool
MQL_OPTIMIZATION
Sign of a running program during optimization
bool
MQL_VISUAL_MODE
A sign that a running program is in visual testing mode
bool
MQL_FRAME_MODE
Sign of running the Expert Advisor on a chart in theframe mode of collecting optimization results
bool
MQL_LICENSE_TYPE
The license type of the EX5 module. The license refers to the EX5 module, from which the request is made using MQLInfoInteger(MQL_LICENSE_TYPE).
ENUM_LICENSE_TYPE
About the files:FileOpen help
The file is opened in the client terminal folder in subfolder MQL5\Files (or in case of testing, in folder_agent_testing\MQL5\Files). If FILE_COMMON is specified among the flags, the file is opened in the common folder of all the client terminals \Terminal\Common\Files.
For example data directory
C:\Users\KVN\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Files,
then the directories of the test agents (using agent #1 as an example) will be here:
C:\Users\KVN\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Files
Choose what you need:
ENUM_MQL_INFO_INTEGER
Identifier
Description
Property type
MQL_MEMORY_LIMIT
Maximum possible size of dynamic memory for an MQL5 program in MB
int
MQL_MEMORY_USED
How much memory an MQL5 program uses in MB
int
MQL_PROGRAM_TYPE
Type of mql5-program
ENUM_PROGRAM_TYPE
MQL_DLLS_ALLOWED
Permission to use the DLL forthis running program.
bool
MQL_TRADE_ALLOWED
Permissionto trade forthis running program
bool
MQL_SIGNALS_ALLOWED
Allowto work with signals ofthis program
bool
MQL_DEBUG
Sign of a running program in debug mode
bool
MQL_PROFILER
Sign of running a program in the code profiling mode
bool
MQL_TESTER
Sign of running a program in the tester
bool
MQL_OPTIMIZATION
Sign of a running program during optimization
bool
MQL_VISUAL_MODE
A sign that a running program is in visual testing mode
bool
MQL_FRAME_MODE
Sign of running the Expert Advisor on a chart in theframe mode of collecting optimization results
bool
MQL_LICENSE_TYPE
The license type of the EX5 module. The license refers to the EX5 module, from which the request is made using MQLInfoInteger(MQL_LICENSE_TYPE).
ENUM_LICENSE_TYPE
About the files:FileOpen help
The file is opened in the client terminal folder in subfolder MQL5\Files (or in case of testing, in folder_agent_testing\MQL5\Files). If FILE_COMMON is specified among the flags, the file is opened in the common folder of all the client terminals \Terminal\Common\Files.
For example data directory
C:\Users\KVN\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Files,
then the directories of the test agents (using agent #1 as an example) will be here:
C:\Users\KVN\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Files
Thank you, I understand everything at once with replacement of IsTesting, and I'll deal with the log file, in trade mode my file is written, but in the test it is not. (
Thank you
Can you please tell me if I put one EA on 10 different charts or on 10 identical charts, but with different TFs, do I need to go to the properties of the EA on each chart and change the Magic number?
Thank you
To avoid the hassle of finding the logs folder, simply switch to the "Log" tab in the Strategy Tester, click there and select "Open" from the context menu that opens. This will launch the Explorer, which will immediately open the folder with the logs of the Strategy Tester.
I didn't write the standard log you're talking about. I create my own log and write in it what I need. in trade works in the tester does not create the file.
However you try to create the file - the files will be created inside the sandbox. How to find files:
Forum on trading, automated trading systems and trading strategy testing
Questions from Beginners
Karputov Vladimir, 2016.09.06 10:19
...
About the files:FileOpenhelp
The file is opened in the client terminal folder in subfolder MQL5\Files (or in case of testing, in the_agent_testing_directory\MQL5\Files). If FILE_COMMON is specified among the flags, the file is opened in the common folder of all the client terminals \Terminal\Common\Files.
For example data directory
C:\Users\KVN\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Files,
then the directories of the test agents (using agent #1 as an example) will be here:
C:\Users\KVN\AppData\Roaming\MetaQuotes\Tester\D0E8209F77C8CF37AD8BF550E51FF075\Agent-127.0.0.1-3000\MQL5\Files
However you try to create the file - the files will be created inside the sandbox. How to search for files:
Here it is like in MT5!!! )) found it! )) THANK YOU!
Was looking in the terminal folder and it's in the Tester folder ... but not the one in the Terminal folder!
Tell me, did I write the closing price indicator correctly or are there pitfalls I haven't considered?
Fun_1() and Fun_2() are similar.