Errors, bugs, questions - page 2905

 

Who should solve the problems of last price sticking? The broker or MQ?


 

Does not compile:

template<typename T> 
class A  {  };

class B
  {
   template<typename T> void X(A<T>&);
  };
template<typename T> void B::X(A<T>&)  {  }

It compiles:


template<typename T> 
class A  {  };

class B
  {
   template<typename T> void X(A<T>&){}
  };


What's the catch?


void OnStart(void)
  {
   B b;
   b.X(new A<int>);
  }


'X' - member function already defined with different parameters 
'X' - ambiguous call to overloaded function     
could be one of 2 function(s)   
   void B::X(B::A<T>&)  
   void B::X(B::A<T>&)  


 
DMITRII PECHERITSA:

Does not compile:

It compiles:

What's the catch?

This is a known compiler bug, a fix has been postponed for now.

 

Good afternoon!

The copying of signals is not working.

I can see that the signals on the signatory were there, the copying did not take place in the system.

 
dnch:

Good afternoon!

The copying of signals is not working.

I see that the signals on the signer were, the copying did not take place in the system.

Are you copying to the terminal for Windows desktop version or to the terminal located on VPS?

 
How does local optimization behave when multiple copies of MT5 (potentially different versions) are running andoptimization is running in each of them (maybe not simultaneously)? Judging by the user's message, when you try to optimize one Expert Advisor in one copy, optimization of another Expert Advisor is launched from another copy.
 
Vladimir Karputov:

Are you copying to terminal for Windows desktop version or terminal located on VPS?

To Windows on VPS.

Already figured it out, as it usually happens, not very smooth hands are to blame))

Thanks for such a quick response!

 

Can't get the funds out of the product sold. The clock has started counting down to the negative side. What's wrong?

 

Can anyone tell me what flags are received when copying ticks

2020.11.18 23:50:07.449 00 (Si-12.20,M1)                          [time]  [bid]  [ask] [last] [volume]    [time_msc] [flags] [volume_real]
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 0] 2020.11.18 20:01:01  76087  76088  76087        1 1605729661364     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 1] 2020.11.18 20:01:03  76087  76088  76087        2 1605729663138     344             2
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 2] 2020.11.18 20:01:03  76087  76089  76088        1 1605729663414     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 3] 2020.11.18 20:01:03  76087  76089  76089        1 1605729663619     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 4] 2020.11.18 20:01:03  76087  76088  76088        1 1605729663791     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 5] 2020.11.18 20:01:07  76087  76089  76087        1 1605729667934     344             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 6] 2020.11.18 20:01:07  76087  76089  76084        1 1605729667934     344             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [ 7] 2020.11.18 20:01:07  76087  76089  76084        5 1605729667934     344             5


2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [84] 2020.11.18 20:01:32  76071  76075  76074        1 1605729692079     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [85] 2020.11.18 20:01:37  76074  76075  76075        1 1605729697259     312             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [86] 2020.11.18 20:01:37  76074  76075  76075       11 1605729697259     312            11
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [87] 2020.11.18 20:01:40  76065  76069  76069        2 1605729700021     312             2
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [88] 2020.11.18 20:01:42  76067  76072  76067        2 1605729702403     344             2
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [89] 2020.11.18 20:01:43  76063  76072  76065        1 1605729703986     344             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [90] 2020.11.18 20:01:43  76063  76072  76064        1 1605729703986     344             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [91] 2020.11.18 20:01:44  76062  76072  76063        1 1605729704550     344             1
2020.11.18 23:50:07.449 00 (Si-12.20,M1)        [92] 2020.11.18 20:01:44  76062  76072  76063        2 1605729704550     344             2

Script code

/********************Script program start function*******************/
void OnStart()
 {
  MqlTick mqlTick[];
  ulong stMSC = D'2020.11.18 20:01:00'*1000, enMSC = D'2020.11.18 20:02:00'*1000;
  CopyTicksRange(_Symbol, mqlTick, COPY_TICKS_TRADE, stMSC, enMSC);
  ArrayPrint(mqlTick);
 }/******************************************************************/

Exactly the same result from this script

/********************Script program start function*******************/
void OnStart()
 {
  MqlTick mqlTick[];
  ulong stMSC = D'2020.11.18 20:01:00'*1000/*, enMSC = D'2020.11.18 20:02:00'*1000*/;
  CopyTicks(_Symbol, mqlTick, COPY_TICKS_TRADE, stMSC, 93);
  ArrayPrint(mqlTick);
 }/******************************************************************/

If I replace it with COPY_TICKS_ALL, I get flags 2, 4 and their sum of 6. But 312 and 344 are also present. It should not exceed 126. During the trading day we observe 56 and 88 when requesting COPY_TICKS_TRADE... Why so many?

 

Please add in this line after compiling:

0 errors, 0 warnings, 618 msec elapsed

local time when compilation was done.