Errors, bugs, questions - page 2291

 
Alexey Navoykov:

it is not possible to determine programmatically which object is higher or lower.

It may be worth looking at the order in which objects are stored in the template. I think the later an object is stored there, the higher it is above the others.
 

The .ex5 library cannot be loaded if it is located in the common directory of all MetaTrader 5 client terminals (Common\MQL5\Libraries) as described in the Documentation- "Search for the imported EX5 library in the following sequence: point 3"

#import "Test.ex5"
        void f();
#import
void OnStart()
{
        f();
}

Result: cannot open file 'Test.ex5'

while 'Test.ex5' is in the Common\MQL5\Libraries folder

 
fxsaber:
It may be worth looking at the order in which objects are stored in the template. I think the later an object is stored there, the higher it is above the others.
In order to place an object above all others, regardless of the order in which it is stored, you must first make it invisible on all timeframes, and then make it visible again
 
Tetyana Shcherba:

I don't know if I'm writing in the right place, but in my signal, which serves to monitor the performance of the EA, a warning has appeared which has absolutely nothing to do with reality.

""80% of the gains have been made in 16 days. That's 4% of the signal's total lifetime of 376 days.""


How can this be, or am I misunderstanding something?

I noticed that yesterday too. They must be fixing the formula.
 

Passes that return INIT_PARAMETERS_INCORRECT during Optimization have the following entries in the log

Core 3  pass 90 tested with error "incorrect input parameters" in 0:00:00.000
Core 3  pass 91 tested with error "incorrect input parameters" in 0:00:00.125
Core 3  pass 92 tested with error "incorrect input parameters" in 0:00:00.141


At the same time, they appear in the optimization results for some reason


You can see in the screenshot that they are sorted by profit, but the Incorrect passes don't succumb to this sorting. Therefore, when I move down the list, I see incorrect passes instead of negative ones. The value zero supposedly indicates that there are no negative passes. I have to scroll down to find these very negative passes, unless I'm misled by this GUI behavior.


Previously, OnInit and ExpertRemove nulls could not be shown in Optimization results. And even if they were shown, their rows in the table were marked red. Is it possible to bring this behavior back?


When exporting XML, does it pass information that some rows in the table are Incorrect results? If I understand correctly, this correctness flag is stored in the not yet opened opt-format.

It would be nice to be able to get it in OnTesterPass.

Forum on trading, automated trading systems and strategy testing

Errors, bugs, questions

fxsaber, 2018.09.13 06:16

At the end of Optimisation, the tester gives this
Tester  optimization finished, total passes 691200 (successful 673286 passes)

Expertl are passes that have reached the end. The rest are interrupted by ExpertRemove.


By which flag does Tester classify the passes received from Agents? How do I read this flag in OnTesterPass?


And on Optimization chart it would be nice not to show Incorrect passes.


 

Forum on trading, automated trading systems and trading strategy testing

Bugs, bugs, questions

fxsaber, 2018.09.13 06:16

At the end of the Optimisation, the tester outputs this
Tester  optimization finished, total passes 691200 (successful 673286 passes)

Expertl are the passes that have reached the end. The rest are interrupted by ExpertRemove.


I don't understand why Tester doesn't say a word about successful- passes

Tester  optimization finished, total passes 1800

There are ExpertRemove interrupted passes, but the response at the end is not at all as seen in the quote above.

 
Slava:
To place an object above all others, regardless of the order in which it is placed, you must first make it invisible on all timeframes and then make it visible again
I already wrote about this on the previous page. The question was different: how do I then determine this programmatically?
 
Alexey Navoykov:
I already wrote about this on the last page. The question was different: how do you then determine this programmatically?
No
 
Compilation error
typedef void (*fn1)();
void f1() {}
void g()
{
        fn1 f = f1; //(1) нормально
}
/*...*/
typedef void (*fn2)();
void f2() {}
void OnStart()
{
        fn2 f = f2; //(2) Error: 'f2' - type mismatch
}

What difference does it make!?

 
Slava:
No
// В комментарии к чарту выводит текущую Z-глубину всех графических объектов чарта

#define private public
  #include <fxsaber\Expert.mqh> // https://www.mql5.com/ru/code/19003
#undef private

#define  STRING_END "\r\n"
#define  OBJECT_NAME "name="
#define  OBJECT_BEGIN ("<object>" + STRING_END)

int GetZObjects( string &Names[], const long Chart_ID = 0 )
{
  const int Size = ArrayResize(Names, ObjectsTotal(Chart_ID));
  string Template = EXPERT::TemplateToString(Chart_ID);  
  
  for (int i = 0; i < Size; i++)
  {
    Template = EXPERT::StringBetween(Template, OBJECT_BEGIN);
    
    Names[i] = EXPERT::StringBetween(Template, OBJECT_NAME, STRING_END);
  }
  
  return(Size);
}

void OnChartEvent( const int id, const long&, const double&, const string& )
{
  if ((id == CHARTEVENT_OBJECT_CHANGE) ||
      (id == CHARTEVENT_OBJECT_CLICK) ||
      (id == CHARTEVENT_OBJECT_CREATE) ||
      (id == CHARTEVENT_OBJECT_DELETE) ||
      (id == CHARTEVENT_OBJECT_DRAG) ||
      (id == CHARTEVENT_OBJECT_ENDEDIT))
  {
    string ZObjects[];
    
    string Str = NULL;
    
    for (int i = GetZObjects(ZObjects) - 1; i >= 0; i--)
      Str += (string)i + " Z: " + ZObjects[i] + "\n";
      
    Comment(Str);
  }
}
Reason: