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
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
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
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
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
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;
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
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
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
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
I am trying to calculate the current balance using CDealInfo and HistorySelect. But every time I run the script I get a different results. What am I doing wrong? Thank you so much!! #include <Trade\DealInfo.mqh> CDealInfo deal;
I would like to expand the backtest report and to do some additional calculations and graphs. I know that ENUM_STATISTICS and TesterStatistics () function exists. That is great!!. But I would also like to access the information of each
I wanted to do a linear regression like in this example. https://www.mql5.com/es/code/1146 I was looking for the CAlglib class reference manual but i found nothing in MQL5 i was looking in the official project site but i found nothing too
I wrote the following code. I expected to have one operation per year. However I see that many operations are missing. For example: EURUSD (1971-2021) it has 50 years of history but I only get 23 trades. I have tried with many currency pairs and
I am testing Stochastic crosses and I have noticed that sometimes it fails when the cross occurs exactly when a new candle opens. This happens very often and I think too much precision is lost. Is this normal or is it a bug in my code? Is there any
I have an indicator in a separate window and I would like the zero level to not move from the middle of the window. (The same that scale by line but from code MQL5)... Is it possible to do that? How? I was reading this but i saw nothing
Hi. I don't know what exactly happens. I am comparing two integers that have the same value (with the > operator) and However the control statement "if" returns true ... Does anyone know why this happens and how to fix it? I attach a image of the
I was using MqlTradeRequest and OrderSend() to open my positions. But now I am thinking of updating my code and to use CTrade and PositionOpen() instead. But I have a couple of doubts about it. (Deviation, MagicNumber and How to handle errors). In
The compiler does not detect the following error and compiles the code without warnings. When I create a class like this: class MyClass { public : void MyClass() { } }; and then I want to instantiate it and forget