Forum

The execution of OnTesterPass() event after OnTester() event is synchronous or asynchronous?

I wonder if the execution of OnTesterPass() event is synchronized with respect to the execution of each OnTester() event. I mean if OnTester() runs on different threads simultaneously. When they are finished then OnTesterPass() are finshed is in the same sequence? Or they are disorderly? Thank you

Is it possible to optimize without connection to the broker's server?

My broker's server is down this morning. And that's why MT5 doesn't work to optimize (I think). I am getting these warning messages. 2021.10.17 09:36:34.677 Network '3000028082': connection to "MyBrokerName" lost 2021.10.17 09:36:54.003 Core 1 connecting to 127.0.0.1:3000 2021.10.17

Help me to understand how FrameAdd() work

I'm a bit confused about how frames work. I know that you can set a custom optimization criteria as follows. double OnTester () { return MyCustomCriteria(); } The genetic algorithm will search to maximize the value of this criteria. I'm not sure if frames are used to do the same thing. I mean, if

How to save correctly all deals into a csv file?

I want to save some histories of the optimizations in a CSV file. But sometimes not all deals are written to the file correctly. For example, maybe one pass had 2000 trades and only 3500 deals were written in the file. Or sometimes some of the data in a row is missing. I don't know what is happening

I can't see any output messages when they are printed from some tester events.

I can't see any output messages when they are printed from some tester events. Do I have to do something special to be able to see them? I have MT5 Build 2981 (21 Jun 2021). Thank you so much!! //+------------------------------------------------------------------+ void OnTesterInit () //--> never {

Why is the same structure smaller in MQL5 than in C ++?

I have a problem. I am trying to send a data structure from an MQL5 program to a C ++ program. And I have noticed that the same structure is smaller in MQL5 than in C++. This is the struct: struct MyStruct { int a; double b; }; this is the C++ code: int main() { cout << sizeof (MyStruct)

How to cast a "int" to "uchar&" for using SocketSend() function?

I need to send an int via socket, but the casts I'm using doesn't works. How to do it in MQL? I'm trying it like this. int buffer; SocketSend (socket, ( uchar *)&buffer, sizeof ( int )); Thank you so much

Tester - imported DLL "kernel32.dll" not allowed in Cloud Network

I get this message during optimizations Tester - imported DLL "kernel32.dll" not allowed in Cloud Network . But I am optimizing in my Local Network only. So ... is there any way to stop this ban? I want to use that DLL. Thank you so much

How to import a class from a DLL? (#import was not closed Error)

I am trying to import a complete class from a DLL. But I have some errors while compiling. Error 1 - #import was not closed Error 2 - Sum - Member function was no defined. 1 - I compiled the dll using C++ and 64 bits 2 - I put the DLL inside of this Path

Problem writing a file

I want to save the deals of my optimizations in different files. To do this I wrote the following code. This works perfectly in test mode . But it doesn't work during optimization. Does anyone know how to do it correctly? Thank you very much !! #include <Trade\Trade.mqh> #include