Errors, bugs, questions - page 1720

 
Karputov Vladimir:

The error lies here (space between inverted commas):


It's true. It's working now. Thanks ! :-)
 
Thefile Bases\BCS-MetaTrader5\ticks\Si-12.16\201610.tkcis 6 Gb insize. This should not be the case.
 
fxsaber:
The file Bases\BCS-MetaTrader5\ticks\Si-12.16\201610.tkc is 6 Gb in size. This should not be the case.

Probably in month 10 the structure of the tick data has changed (perhaps a lot of additional information has been introduced). Or maybe it's just that the symbol has become actively traded.

Right now, when requesting with such a script:

//+------------------------------------------------------------------+
//|                                                    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");
  }
//+------------------------------------------------------------------+

on the server "Open-Broker" the size of ticks (and in month 10 it is not final, ticks continue to be uploaded)

Tick database size

2016.10.05 07:34:05.886 Terminal        MetaTrader 5 x64 build 1434 started (MetaQuotes Software Corp.)
2016.10.05 07:34:05.888 Terminal        Windows 10 Pro (x64 based PC), IE 11.00, UAC, Intel Core i3-3120 M  @ 2.50 GHz, RAM: 3800 / 8077 Mb, HDD: 57955 / 233310 Mb, GMT+02:00
2016.10.05 07:34:05.888 Terminal        C:\Users\KVN\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075
Files:
CopyTicks.mq5  2 kb
 
Karputov Vladimir:

Probably in month 10 the structure of the tick data has changed (perhaps a lot of additional information has been entered). Or maybe it's just that the symbol has become actively traded.Now, when queried by such a script:

on the server "Open-Broker" the size of ticks (and in month 10 it is not final, ticks continue to be uploaded)

Script

#define  TOSTRING(A) #A + " = " + (string)(A) + " "

void OnStart()
{
  MqlTick Ticks[];
  
  const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_ALL, D'2016.10.01' * 1000, 1000000000);
  
  if (Amount > 0)
    Print(TOSTRING((Amount * sizeof(MqlTick)) >> 20) + "Mb " + TOSTRING(Ticks[0].time) + TOSTRING(Ticks[Amount - 1].time));
}

Result (running it on other symbols gives the same result) on empty terminal (one chart without Expert Advisors and indicators)

2016.10.05 08:16:56.824 Scripts script Test (Si-12.16,M1) removed
2016.10.05 08:16:56.821 MemoryException 52000000072 bytes not available
2016.10.05 08:16:56.816 Scripts script Test (Si-12.16,M1) loaded successfully
2016.10.05 08:10:10.408 Terminal        RAM: 81 Mb reserved, 491 Mb committed

 
Karputov Vladimir:

Probably in month 10 the structure of the tick data has changed (perhaps a lot of additional information has been introduced). Or maybe it's just that the symbol has become actively traded.

Right now, when querying with such a script:

on the server "Open-Broker" the size of ticks (and in month 10 it is not final, ticks continue to be uploaded)

I didn't have enough patience - at file size 201610.tkc of 7.5 Gb decided to interrupt the ticks download.
 

If you grok the file, there will be an error even after rebooting.

If requesting 1000 ticks from October 1st, the corresponding tkc file will keep growing after each startup. In short, the bug is fucked up.

 
Karputov Vladimir:
I didn't have enough patience - at file size 201610.tkc of 7,5 Gb I decided to interrupt downloading of ticks.

Bug! All the information for October is shown by the indicators. And the file is growing endlessly.

I need critical update of the build, because it's impossible to work - the disk is clogged, not to mention the traffic.

 

hello all

Who has encountered the following strange error

my Expert Advisor is trying to open a trade onWDOX16 for example, gets reply = 0

at the same time writes that operation is successful:Result = 0 symbol WDOX16 volume 1.0 action 1 tp 3264.5 sl 3239.5 type 0 price 3250.0 The operation completed successfully

But still nothing opens anywhere. ?


 
fxsaber:

Script

Result (running it on other symbols gives the same result) on empty terminal (one chart without EAs and indicators)

Do you always request a milliard of ticks? It's 49 gigabytes just per array. Ticks on Si-12.16 since January till now are 15789962.

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

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;
        }
     }
  }


and gives this result.

2016.10.05 10:31:51.249 CalcTick (Si-12.16,M1)  Month 1: 122413 ticks, 6 Mb
2016.10.05 10:31:51.249 CalcTick (Si-12.16,M1)  Month 2: 78627 ticks, 3 Mb
2016.10.05 10:31:51.252 CalcTick (Si-12.16,M1)  Month 3: 758652 ticks, 37 Mb
2016.10.05 10:31:51.253 CalcTick (Si-12.16,M1)  Month 4: 388578 ticks, 19 Mb
2016.10.05 10:31:51.254 CalcTick (Si-12.16,M1)  Month 5: 181053 ticks, 8 Mb
2016.10.05 10:31:51.255 CalcTick (Si-12.16,M1)  Month 6: 408080 ticks, 20 Mb
2016.10.05 10:31:51.257 CalcTick (Si-12.16,M1)  Month 7: 458366 ticks, 22 Mb
2016.10.05 10:31:51.260 CalcTick (Si-12.16,M1)  Month 8: 867396 ticks, 43 Mb
2016.10.05 10:31:51.297 CalcTick (Si-12.16,M1)  Month 9: 10973162 ticks, 544 Mb
2016.10.05 10:31:51.301 CalcTick (Si-12.16,M1)  Month 10: 1555625 ticks, 77 Mb


Here's how it looks like on disk


 
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.

No, only in this case. If I'm requesting a trillion ticks, and they're actually less than 20 million, why try to allocate memory for a trillion?!

A trillion is with a margin. But that doesn't say one bit that I'm requesting that much. It only says "give me ALL the ticks from the specified date".

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.

You do experiments on Otkritie, I have BCS. Your screenshot has nothing in common with mine and with Karputov's (same Opening) - both have much more October-tkc. And it's getting bigger all the time!