Errors, bugs, questions - page 2908

 

If there is a more appropriate thread for codebase questions, move the question there. These "bugs" are too long and probably not read very carefully by MQ.

Such a problem. I want to publish a module for MQL Wizard to generate universal signals, i.e. user customizable and using arbitrary indicators, rather than the limited set that comes with the standard library. I have attached the Expert Advisor generated using the new module as mq5 code. But of course, there are no hardcoded signals in the module, because the whole point of the module is customization. As a result, the Expert Advisor neither trades nor gets automatically verified.

What are the options for solving the problem?

 
Stanislav Korotky:

If there is a more appropriate thread for codebase questions, move the question there. These "bugs" are too long and probably not read very carefully by MQ.

Such a problem. I want to publish a module for MQL Wizard to generate universal signals, i.e. customizable by the user and using arbitrary indicators, rather than the limited set that comes with the standard library. I have attached the Expert Advisor generated using the new module as mq5 code. But of course, there are no hardcoded signals in the module, because the whole point of the module is customization. As a result, the Expert Advisor neither trades nor gets automatically verified.

What are the options for solving the problem?

I have bypassed the EA opening orders by time, opening an order with SL and TP in OnInit. in mt4. I passed validation half a year ago.

I have also set the condition: If it is in the tester, we open an order, if not, we skip it. Validation is performed in the tester.

 
Stanislav Korotky:

If there is a more appropriate thread for codebase questions, move the question there. These "bugs" are too long and probably not read very carefully by MQ.

Such a problem. I want to publish a module for MQL Wizard to generate universal signals, i.e. customizable by the user and using arbitrary indicators, rather than the limited set that comes with the standard library. I have attached the Expert Advisor generated using the new module as mq5 code. But of course, there are no hardcoded signals in the module, because the whole point of the module is customization. As a result, the Expert Advisor neither trades nor gets automatically verified.

What are the options for solving the problem?

Thought it would be possible to make a trigger wrapper using #property tester_set directive, but it turns out it does not automatically set these parameters by default, but only adds a menu item to the tester for manual selection.

 
Stanislav Korotky:

Thought it would be possible to make a launcher wrapper using the #property tester_set directive, but it turns out that it does not automatically set these parameters by default, but only adds a menu item to the tester for manual selection.

I also tried the #property tester_file directive "DefaultSettings.tpl". The specified file is copied to the agent in the root folder, but is not applied automatically (at least in terms of Expert Advisor settings).

 
Aleksei Ostroborodov:
The product rating, number of votes and reviews are not displayed in the marketplace, although they are present inside the description https://www.mql5.com/en/market/
Thanks for the solution to the specific case.
But what about the other products? I have the same situation with four other EAs. Should I post a link every time?
 

The tester switches to "settings" tab during EA optimisation with every new run, no way to control agents status, just runs away to another tab. I noticed it today, currently build 2697.

Distributes an uneven number of tasks to the local agents and none of them gets executed



Any ideas?

Как в MetaTrader 5 быстро разработать и отладить торговую стратегию
Как в MetaTrader 5 быстро разработать и отладить торговую стратегию
  • www.mql5.com
Скальперские автоматические системы по праву считаются вершиной алгоритмического трейдинга, но при этом они же являются и самыми сложными для написания кода. В этой статье мы покажем, как с помощью встроенных средств отладки и визуального тестирования строить стратегии, основанные на анализе поступающих тиков. Для выработки правил входа и...
 
How do I get the tick that was before a given time through CopyTicks?
 
fxsaber:
How to get the tick that was before a given time via CopyTicks?

Well, if the max bars in the window are unlimited,

it's probably something like that:

MqlTick Prev_Tick(ulong t) {  // t - время в миллисекундах
   MqlTick ticks[];
   int bar =iBarShift(_Symbol,PERIOD_M1,t/1000); 
   if (bar>=0 && CopyTicksRange(_Symbol,ticks,COPY_TICKS_ALL,iTime(_Symbol,PERIOD_M1,bar)*1000,t)>0) 
      return ticks[ArraySize(ticks)-1];
   else {
      MqlTick tick;  // если до заданного времени нет тиков возвращаем пустой тик.
      return tick;
   }
}

checked, but not with bias.

If bypass bars(iBarShift), then if time falls on a weekend, finding the closest tick can be quite costly.


 
Nikolai Semko:

If you make do without bars (iBarShift), it can be quite costly to find the nearest tick if the time falls on a weekend.

Yes, the tick to the right is elementary, the tick to the left is horrible.

 
fxsaber:

Yes, the tick on the right is elementary, the tick on the left is horrible.

Yep.
What's missing is that in the function

int  CopyTicks( 
   string           symbol_name,           // имя символа 
   MqlTick&         ticks_array[],         // массив для приёма тиков 
   uint             flags=COPY_TICKS_ALL,  // флаг, определяющий тип получаемых тиков 
   ulong            from=0,                // дата, начиная с которой запрашиваются тики 
   uint             count=0                // количество тиков, которые необходимо получить 
   );

count parameter is int and that function would support negative count values, i.e. backwards.