Errors, bugs, questions - page 2673

 
Sergey Dzyublik:
Bug MT5(build 2323),
Inside a template function, a passed pointer within an explicit type conversion behaves like a class, causing a compile-time error accordingly:

Thanks for the post, fixed

 
Aliaksandr Hryshyn:

The difference there is the presence of brackets.

   ulong n_yes=3*1000;; ok  
   ulong n_no=(3*1000;); ne ok


 
Aliaksandr Hryshyn:

The difference there is the presence of brackets.

it's up to you, but you could have checked before writing

 
MT5 bug (build 2361) another problem with overloaded template function call priorities compared to C++ behaviour.
In MT5 compilation error "ambiguous call to overloaded function", in C++ it's OK.
C++ online(https://onlinegdb.com/Sy8cqdFr8);

template<typename _Tp>
struct It_wrapper{
   _Tp p;
};

template<typename _Tp>
struct It_g : public It_wrapper<_Tp>{};


template<typename _It, typename _Tp>
int __test_print(const It_wrapper<_It> &it, int n, const _Tp &value){
   Print(it.p);
   return 0;
};

template<typename _It> 
int test_print(const It_wrapper<_It> &it, int n, const int value){
   return __test_print(it, n, value);
}    

template<typename _It, typename _ValueType>                                                                                                    
int test_print(const It_wrapper<_It> &it, int n, const _ValueType &value){                                                              
   return __test_print(it, n, value);                                                                                                     
}   
  
   
void OnStart(){
   It_g<int> it;
   It_g<string> it_s;
   
   it.p = 4;
   it_s.p = "test";
   
   const int n = 10;
   test_print(it, 5, n);          // Compile Error: 'test_print' - ambiguous call to overloaded function
   test_print(it_s, 5, n);        // Compile Error: 'test_print' - ambiguous call to overloaded function
};


int main(){
   OnStart();
   return 1;
};
 

The text editor is broken in the marketplace, when you try to expand it to full screen only the save button hangs ....

Plus it's possible to upload a large weight picture, the picture is uploaded but not displayed correctly in the description.
 
Bug 1 The commission position.Comision() in testing is always equal to 0 (in the Strategy Tester the commission is shown in the position history), this affects the optimization of parameters for Expert Advisors that calculate calculations using the commission.

Bug 2 simbol.Spred() gives actual values only on the third access since the start of the program

Bug 3 when I lose a testing agent (I work in local network only) for hours he can't forget it and tries to find it even if the agent has already appeared in local network - I have to change agent ip and only after that tester forgets agent within an hour, I return agent ip and tester continues working. Result is stopping of testing for time from 30 min to few hours - as luck would have it.

Bug 4 in the description of the genetic algorithm, it is written when you stop testing or when you stop testing manually if the testing parameters are not changed the optimization cache is stored and when you resume testing, optimization continues from the point of stopping - no bullshit in reality - optimization starts all over again, and the optimization results are added to the file results of the optimization of stopped optimization. As a result, there are just more optimization results in optimization result file - no practical use in finding optimal parameters, overall optimization time increases.

Bug 5 in mql5 compiler seems to me that it is simply not optimized - programs are just getting slower, which affects the speed of parameter optimization. A program of 20 lines cannot be so slow.
 
Vladimir Pastushak:

Market has broken the text editor, when I try to expand it to full screen only the save button hangs ....

Plus it's possible to upload a large weight picture, the picture is uploaded but not displayed correctly in the description.

Hello!

Thanks for the bug report!

Could you please elaborate on the problem with the picture?

 

I ran into a strange problem, on one tick it opens one order and closes the other at a certain moment. In the tester everything works fine, but I put it on the real account and in one place the tambourine started, the position opens, but the other one does not close. I have a question in this regard: is it possible to send two orders simultaneously (opening and closing) when trading on the real account?

Razgon_y=OrderSend(Symbol(),OP_BUY,Razgon_Lot,Ask,100,0,0,Razgon_Comment,Razgon_Magic,0,clrBlue); 
       if(Razgon_y<0) 
       { 
        Print("OrderSend завершилась с ошибкой #",GetLastError()); 
       } 
       else ( Print("Функция OrderSend успешно выполнена") );
       for(int Razgon_index=0; Razgon_index<=OrdersTotal(); Razgon_index++)
       {
        if(OrderSelect(Razgon_index,SELECT_BY_POS,MODE_TRADES)==true)
        {
         if(OrderMagicNumber()==Razgon_Magic && OrderType()==OP_SELL && OrderProfit()>0)
         {
          Razgon_OC=OrderClose(OrderTicket(),OrderLots(),Ask,100,clrGreen);
          if(Razgon_OC==false) 
          { 
           Print("OrderClose завершилась с ошибкой #",GetLastError()); 
          } 
           else ( Print("Функция OrderClose успешно выполнена") );
          Razgon_AccountEquity=AccountEquity();
         }
        }
       }
      }
 
Maksim Slovakov:

I ran into a strange problem, on one tick it opens one order and closes the other at a certain moment. In the tester everything works fine, but I put it on the real account and in one place the tambourine started, the position opens, but the other one does not close. I have a question in this regard: is it possible to send two orders simultaneously (opening and closing) when trading on the real account?

Your cycle is not correct for closing positions. Do the reverse cycle.

 

Caught a critical error in the terminal while working with the debugger on real data (build 2361):

2020.03.16 16:30:41.730 (RTS Splice,M1)    crash -->  00000115A15300A5 488D0B            lea        rcx, [rbx]

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300A8 E8850B0000        call       0x115a1530c32

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300AD 90                nop        

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300AE 89842488000000    mov        [rsp+0x88], eax

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300B5 F4                hlt        

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300B6 842488            test       [rax+rcx*4], ah

2020.03.16 16:30:41.730 (RTS Splice,M1)               00000115A15300B9 0000              add        [rax], al

2020.03.16 16:30:41.730 (RTS Splice,M1)

2020.03.16 16:30:41.730 (RTS Splice,M1) 00: 0x00000115A15300A5

2020.03.16 16:30:41.730 (RTS Splice,M1) 01: 0x00000115A7DFFD64

2020.03.16 16:30:41.730 (RTS Splice,M1) 02: 0x00000001776FA270

2020.03.16 16:30:41.730 (RTS Splice,M1) 03: 0x0000000000000001

2020.03.16 16:30:41.730 (RTS Splice,M1) 04: 0x00000001776FA23C

2020.03.16 16:30:41.730 (RTS Splice,M1)