Errors, bugs, questions - page 1721

 
Alexey Da:

Do you always request a milliard of ticks? That's 49 gigabytes per array alone. The ticks on Si-12.16 from January till now are 15789962.

A small script, based on yours, counts the number of ticks by month.


and gives this result.


This is what it looks like on disk.


It does not matter how many to order. Even for ordering 20000 ticks (twenty thousand) file for month 10 is measured in gigabytes.

The script, when requesting 20,000

//+------------------------------------------------------------------+
//|                                                    CopyTicks.mq5 |
//|                        Copyright 2015, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.01"
//--- покажем окно входных параметров при запуске скрипта
#property script_show_inputs
input int  ticks=200000000;  // количество запрашиваемых тиков
//---
MqlTick ExTicks[];
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//--- запросим тики
   int copied=CopyTicks(_Symbol,ExTicks,COPY_TICKS_ALL,0,ticks);
//--- если тики получены, то выведем на график значения Bid и Ask  
   Print("Получено тиков: ",copied," код ошибки: ",GetLastError());
   if(copied>1)
     {
      Print("Тик: ",ExTicks[0].time," bid: ",ExTicks[0].bid," ask: ",ExTicks[0].ask," last: ",ExTicks[0].last," [0]");
      Print("Тик: ",ExTicks[copied-1].time," bid: ",ExTicks[copied-1].bid," ask: ",ExTicks[copied-1].ask," last: ",ExTicks[copied-1].last," [",copied-1,"]");
     }
   Print("Size ",((long)copied*sizeof(MqlTick))>>20, " Mb");
  }
//+------------------------------------------------------------------+

gave an incredible file growth for month 10 - the size was measured in Gigabytes.


With the terminal switched off I deleted the tick file for month 10 (size approximately 7.5GB).

Then I ran your script

void OnStart()
  {
   MqlTick Ticks[];
   int Amount=CopyTicks(_Symbol,Ticks,COPY_TICKS_ALL,D'2016.01.01'*1000,ulong(100000000));
   MqlDateTime str;
   TimeToStruct((Ticks[0].time_msc-Ticks[0].time_msc%1000)/1000,str);
   char m=(char)str.mon;
   long n=StringToTime(StringFormat("01.%d.2016",m+1))*1000;
   int pos=0;
   for(int i=0;i<Amount;i++)
     {
      if(Ticks[i].time_msc>=n || i==Amount-1)
        {
         PrintFormat("Month %d: %d ticks, %d Mb",m,i-1-pos,(sizeof(MqlTick)*(i-1-pos))>>20);
         m++;
         n=StringToTime(StringFormat("01.%d.2016",m+1))*1000;
         pos=i;
        }
     }
  }

everything turned out ok, no gigantomania in size - very strange.

Then I ran your script again (input parameters 20000). Everything stabilized - but the file was growing to unimaginable sizes even in the morning! I saw it myself and made the experiment!


Regarding the number of billions of ticks - even a trillion - the terminal will not give more than what it has.

 
Karputov Vladimir:

Everything stabilised - but the file was still growing to an unbelievable size in the morning! I saw it myself and conducted the experiment!

The difference with the current moment is that back then the experiment was conducted in a closed market.
 

Now running the script.

The result is

2016.10.05 11:05:03.374 Test (Si-12.16,M5)      (Amount*sizeof(MqlTick))>>20 = 72 Mb Ticks[0].time = 2016.10.03 09:45:02 Ticks[Amount-1].time = 2016.10.05 11:05:55 

Everything works as it should. Honour and praise for the 72/5 format compression of ~15 times.

Gotta figure out why such a shitty bug appears on a closed market.

By the wayAlexey Da, why is your 201610.tkc bigger than mine?

 
fxsaber:

Now running the script.

The result is

Everything works as it should. Honour and praise for the 72/5 format compression of ~15 times.

We need to figure out why such a shitty bug appears on a closed market.

By the wayAlexey Da, why do you have 201610.tkc larger than mine?

Opening screenshot.

On BCS the size is similar to yours.

But not the same size.

What accesses are you connected to? I've got


 

fxsaber:

We have to find out why such a shitty bug appears on a closed market.

Karputov Vladimir andfxsaber

The system has not been tested and may check its performance and reliability. Please form a ticket to servicedesk with the most complete description, logs, screenshots and timestamp.

 
Alexey Da:

Screenshot from the opening.

On BCS the size is similar to yours.

But not the same size.

I noticed that 201609.tkc is 36Mb in Opening and 32Mb in BCS. But the story is the same! Why is this so?

Well and even if there were server updates in September, there definitely wasn't in October. Why is October's Opening bigger?

In which accesses are you connected through? I have.

All the time.

authorized on BCS-MetaTrader5 through Access Server #1 (ping: 49.30 ms)
 
Alexey Da:

Karputov Vladimir andfxsaber

Please send us a request. Form a ticket to servicedesk with the most complete description, logs, screenshots and indication of time.

Unfortunately, the logs have been lost. Therefore I can not provide any information.

The only thing I remember for sure is that at the time of the bug the first ticks that the script produced were 2016.10.04 09:45.

And when everything is working as it should be - it started giving out 2016.10.03 09:45.

Exactly the only lines that have survived

NE      0       08:43:43.928    Test (Si-12.16,M1)      (Amount*sizeof(MqlTick))>>20 = 0 Mb Ticks[0].time = 2016.10.04 09:45:04 Ticks[Amount-1].time = 2016.10.04 10:02:38 
JP      0       11:03:37.815    Test (Si-12.16,M5)      (Amount*sizeof(MqlTick))>>20 = 0 Mb Ticks[0].time = 2016.10.03 09:45:02 Ticks[Amount-1].time = 2016.10.03 10:02:18 

Upper one - the bug was appearing with all its might.

Lower one - the bug was silenced.

 
Alexey Da:

Karputov Vladimir andfxsaber

Please send us a request. Form a ticket to servicedesk with the most complete description, logs, screenshots and indication of time.

Internal request .../view/1580221
 

In MT4 it is very convenient that the Navigator->Favourites shows the programmes together with their finding path.

For example, fxsaber\Test.

In MT5 it is not so convenient. Please add.

 
Comments not relevant to this topic have been moved to "Question on fill-in-the-blank mode".
Reason: