Questions from Beginners MQL5 MT5 MetaTrader 5 - page 774
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
What is it? I'm not a good judge of MQL4, if you tell me what I need to get, I will be able to write it in MQL5.
I think it has something to do with history profit/loss calculation.
That's the thing, I don't understand it myself - the code was written to my order, pulled out of a class. I'm also inclined to think that this code is for balance calculation. But, according to the idea, the change of balance with the opening-closing of a new order should be reset in the array, but I don't see it...
Please help me rewrite code on MT5 - I don't know anything about orders :(
#include <MT4Orders.mqh>
Thank you, the EA with this class compiled - I don't know if it will conflict...
Now getting an error when running the test
2017.08.23 11:22:59.929 Core 3 2016.06.01 00:00:00 DLL loading is not allowed
2017.08.23 11:22:59.929 Core 3 global initialization failed
2017.08.23 11:22:59.929 Core 3 global initialization critical error
2017.08.23 11:22:59.929 Core 3 tester stopped because expert initialization failed
Library call is used - in MT4 everything is correct.
What can be the reason?
Thank you, the EA compiled with this class - but I don't know if it will conflict...
It won't.
Now getting an error when running the test
2017.08.23 11:22:59.929 Core 3 2016.06.01 00:00:00 DLL loading is not allowed
2017.08.23 11:22:59.929 Core 3 global initialization failed
2017.08.23 11:22:59.929 Core 3 global initialization critical error
2017.08.23 11:22:59.929 Core 3 tester stopped because expert initialization failed
Library call is used - in MT4 everything is correct.
What could be the reason?
In Terminal allow the use of DLL.
It will not.
In the Terminal, allow the DLL to be used.
You won't believe it - I did, but it had no effect - apparently the cache is there, which is cleared after some time - it's working now. Thank you.
How can agents be taught to write to the same file? Right now everyone creates their own file in their own folder, which is not good.
How can agents be taught to write to the same file? Right now everyone creates their own file in their own folder, which is not good.
Alexey, open the documentation at least once... It is accurately described there which flag point to the general folder, which opens the general access to the file. Whether it is easier to wait for the answer, than to read documentation?
How can agents be taught to write to the same file? Right now, everyone creates their own file in their own folder, which is not good.
First (Step 1) you need to overcome:
... in its own folder, ...
This is done with the FILE_COMMON flag - all agents will now write to a common folder (but still each agent will write to its own file).
Example EA:
To quickly open this common folder, do the following: In the MetaEditor, select "Open Common Data Folder" in the File menu.
Now run this EA for optimization and watch as new files are created in the Common Data Folder as tests are run.
First (Step 1) needs to be defeated:
This is done with the FILE_COMMON flag - all agents will now write to a common folder (but still each agent will write to its own file).
Example EA:
To quickly open this shared folder, do the following: in the MetaEditor code editor, select "Open Common Data Folder" from the File menu.
Now run this EA for optimization and watch how new files will be created in the Common Data Folder as the tests are run.
I don't want to put it into Common, as the terminal runs in its own directory, and there will be many files, as you say anyway, which doesn't solve the problem.
I don't want to go into Common, as the terminal runs in its own directory, and there will still be a lot of files, as you say, which doesn't solve the problem.
It says: " ... Step 1 ..."
On step 2 - now think for yourself, namely, how multiple threads WITHOUT CONFLICT can write to ONE file.