Errors, bugs, questions - page 2650

 
Can you tell me where the bug is, in MQL4 or MQL5?
struct A
{
  static const int Array[];
};

static const int A::Array[] = {0};

struct B : public A
{  
  int i[sizeof(B::Array)]; // MQL5 - ok, MQL4 - ok.
  int j[sizeof(A::Array)]; // MQL5 - ok, MQL4 - error.
};
Search string: Oshibka 004.
 
fxsaber:

Could you look into this problem as well?


The moderator was updating by hand at my request. But I can't ask every time. The machine doesn't go through.

Corrected.

 
Anton:

Corrected.

I see, thank you.

 
Andrey Khatimlianskii:

On the ticks of all the tools used.


here is my code to check for new ticks:

void OnTimer()
  {
//+------------------------------------------------------------------+
// Перебор всех символов, которые указаны в внешних переменных
// Recursion of all symbols that are specified in external variables
//+------------------------------------------------------------------+
   string SymbolToTick="";
   for(int si=0; si<12; si++)
     {
      if(si==0)
         SymbolToTick=PAIR1;
      if(si==1)
         SymbolToTick=PAIR2;
      if(si==2)
         SymbolToTick=PAIR3;
      if(si==3)
         SymbolToTick=PAIR4;
      if(si==4)
         SymbolToTick=PAIR5;
      if(si==5)
         SymbolToTick=PAIR6;
      if(si==6)
         SymbolToTick=PAIR7;
      if(si==7)
         SymbolToTick=PAIR8;
      if(si==8)
         SymbolToTick=PAIR9;
      if(si==9)
         SymbolToTick=PAIR10;
      if(si==10)
         SymbolToTick=PAIR11;
      if(si==11)
         SymbolToTick=PAIR12;
     
      if(SymbolToTick=="" && si==0)
        {
         SymbolToTick=Symbol();
        }
      if(SymbolToTick=="")
         continue;
      //|#############################################################################################+
      // проверяем текущий Бид Аск
      MqlTick last_tickSymbol;
      SymbolInfoTick(SymbolToTick,last_tickSymbol);
      double currentBid=last_tickSymbol.bid;
      double currentAsk=last_tickSymbol.ask;

      //|#############################################################################################+
      // Если тик изменился, запускаем тик этого символа
      if(currentBid!=LastBid[si] || currentAsk!=LastAsk[si])
        {
         // Запускаем исполнение тика
         OnTickSymbol(si,SymbolToTick);
         LastBid[si]=currentBid;
         LastAsk[si]=currentAsk;
         TicksAllNumbers[si]++;
        }
      //|#############################################################################################+
     }
  }


Created an array for testing with the number of ticks counted.


Testing two pairs EURUSD GBPUSD

Running a test on GBPUSD:

2020.02.18 14:01:03.802	Core 1	2020.02.16 23:59:58    TICKS EURUSD TicksAllNumbers=621120
2020.02.18 14:01:03.802	Core 1	2020.02.16 23:59:58    TICKS GBPUSD TicksAllNumbers=1143002


Running a test on EURUSD:

2020.02.18 14:01:37.129 Core 1  2020.02.16 23:59:58    TICKS EURUSD TicksAllNumbers=621120
2020.02.18 14:01:37.129 Core 1  2020.02.16 23:59:58    TICKS GBPUSD TicksAllNumbers=1143002


The ticks seem to be the same. ... ... ... so I must have missed something somewhere.....

Thanks, I'll keep digging.



DECISION: _Digit was in the code, I must have added it to the environment..... without looking.

no need to comment :-)

 
Anton:

Move mql5pack-ico.zip file in archive to the folder.

Moved this file to the MQL5/Scripts folder. It didn't help. Then moved it to MQL5/Files folder - didn't help either.

I probably don't understand what it's about.

 
Stanislav Korotky:

Moved it to the MQL5/Scripts folder. Didn't help.

Fixed.

 

Konstantin Gruzdev

You are an interesting author, the most interesting one here. asked a question to Vladislav, I am also interested in multicurrency, as there are nuances on the new bar and on the non-applicability of all the necessary bars

 
the multicurrency issue is still hanging, MQ does not want to give signals for some reason, I prefer the programmers to fill up with timing and spy problems. this should not last long.
 
Vladislav Andruschenko:
Through the timer yes,
More likely to increase the timer frequency ......
It's missing some number of ticks. That's why there is a difference in the results. The difference is very small. But it is enough to skip 1 tick and everything is turned upside down.

It's not a fact that frequency will improve results, but it will definitely slow down the speed of tests. Timer events are not perfect, there will almost always be an error. Even on an empty timer you can see the error. If there are calculations within the timer function, the margin of error is likely to be higher. Loading the computer with third-party tasks can also affect the timer. There is a chance that not all open/close/modify signals will hit at the same time and on the same ticks.

It's worth mentioning that I made all these observations a couple of years ago on a heavy multicurrency tool that uses almost 30 instruments simultaneously. The results only matched when the timer was off. I assume that not much has changed now.

 
Fast235:

Konstantin Gruzdev

You are an interesting author, the most interesting one here. asked a question to Vladislav, I am also interested in multicurrency, as there are nuances on the new bar and on the non-applicability of all the necessary bars

Ok. Answer above.

Reason: