Questions from Beginners MQL5 MT5 MetaTrader 5 - page 145

 
forexman77:

I need a test pass. The EA does not trade if:

I want to do this to reduce the testing time.

Maybe there is a function in the Strategy Tester specifically for the input parameters that the Expert Advisor has?

IfStop <=Start, we skip this pass.

I have answered your question exactly.

if(Stop <=Start) { ExpertRemove();}
 
MetaDriver:

I have answered your question exactly.

I see, I will give it a try.
 
forexman77:
I see, I'll give it a try.
If you find something better, let me know, I need it too.
 
MetaDriver:

I have answered your question exactly.

It doesn't work. I find that when testing, there are sections where the stop is smaller than the start. In my opinion, you need to use the functions for the tester.
 
forexman77:
It doesn't work. There are sections of the test where the stop is smaller than the start. In my opinion it is necessary to use the functions for the tester.
There is no special tester function.
 
Is it possible to programmatically run all the optimisation results on a single test?
 

Question about closing a child window.

There are two windows, both CAppDialog classes. I call a child window from the main one. So, when child window close button is clicked, both windows are closed and EA too.

At the same time, the OnClickButtonClose event is not called in the main parent window. How to solve this?

Документация по MQL5: Стандартная библиотека / Классы для создания панелей и диалогов / CAppDialog
Документация по MQL5: Стандартная библиотека / Классы для создания панелей и диалогов / CAppDialog
  • www.mql5.com
Стандартная библиотека / Классы для создания панелей и диалогов / CAppDialog - Документация по MQL5
 
MetaDriver:
If you find something better, let me know, I need it too.
int OnInit()
  {
   if(stop<=start)
      return(INIT_PARAMETERS_INCORRECT);
...
   return(INIT_SUCCEEDED);
  }
 
stringo:
Oh! Thank you!
 

Started debugging EA, trades open, but sometimes Error 4752: Trading for Expert Advisor prohibited.

How do I know the reason? Maybe there is a function?

Expert Advisor because of the error alerts, it eats the most time in all lines.

Reason: