Errors, bugs, questions - page 2057

 

I've already made a bug report, but if anyone's interested...

Roffild:
Проблема даже с чтением 1000 байт. Может на следующей неделе исправят, а то не получается сейчас читать бинарный файл больше 2гб.

void OnStart()
  {
   double data[];
   int hfile = FileOpen("bytes2147483640.bin", FILE_BIN);   
   Print("read = ", FileReadArray(hfile, data, 0, 1000));
   Print("size = ", ArraySize(data));
   FileClose(hfile);
   ArrayResize(data, 0);
   hfile = FileOpen("bytes2147483649.bin", FILE_BIN);   
   Print("read = ", FileReadArray(hfile, data, 0, 1000)); // read = 4026531841
   Print("size = ", ArraySize(data)); // size = 0
   Print("error = ", GetLastError()); // error = 0
   FileClose(hfile);
  }
Total Commander can split a large file (I took some mkv) into files of the right size. Only the file size is important for checking, not the file contents.
 

Hello.

Trying to test the bot on a monthly timeframe, but the tester does not give the history for it (0 bars). Reloading the quote archive does not help. I do not know something? :)

 
Roffild:

I've already made a bug report, but if anyone is interested...

Total Commander can split large file (I took some mkv) into files of desired size. It's only the size of the file that matters, not the contents.

I am using FileLoad.

Документация по MQL5: Файловые операции / FileLoad
Документация по MQL5: Файловые операции / FileLoad
  • www.mql5.com
//|                                                Demo_FileLoad.mq5 | //|                        Copyright 2016, MetaQuotes Software Corp. | //|                                             https://www.mql5.com | //| Script program start function                                    |...
 
Roffild:

I've already filed a bug report, but if anyone's interested...

It's probably not a bug, but... let's say a limitation. I suspect it's just using old 32bit file operations.

 
Комбинатор:

It's probably not a bug, but... let's say a limitation. I suspect it's just using old 32-bit file operations.

If reading was interrupted after INT_MAX bytes, it can be explained, but it won't even read the beginning of the file...

 
ArrayPrint bug
void OnStart()
{  
  MqlParam Params[] = {{TYPE_STRING}};

  ArrayPrint(Params);
  Print(Params[0].type);
}


Result

    [type] [integer_value] [double_value] [string_value]
[0]    ...               0        0.00000 null          
14
 
fxsaber:
ArrayPrint bug

This is the first time I've seen a problematic message about ArrayPrint, while this is not its only flaw. This once again confirms that ArrayPrint is not really in demand, while it is because of it that ToolsExperts made an inconvenient monospace font which reduces the usable amount of printed information by up to 40%.

 
Комбинатор:

It's probably not a bug, but... let's say a limitation. I suspect it's just using old 32-bit file operations.

So it's ok: create 3Gb file -> write -> read

#define  COMMA  ,
#define  MACRO( flag, value, file, function, comma ) \
{ \
    long offset = long(INT_MAX)/2*3; \
    int h = FileOpen( file, flag | FILE_COMMON | FILE_BIN ); \
    Print( StringFormat( "%d:%d", h, FileSeek( h, offset, SEEK_SET )) \
         + StringFormat(   ":%d",    function( h comma value, sizeof(int))) \
         + StringFormat(   ":%dGb",  FileSize( h )/1024/1024/1024 )); \
    FileClose( h ); \
}
void OnStart()
{
    MACRO( FILE_WRITE, 33, "3Gb.bin", FileWriteInteger, COMMA ) //записали число 33 в конец 3Gb файла
    MACRO( FILE_READ,    , "3Gb.bin", FileReadInteger,        ) //прочитали
}

Result: 1:1:33:3Gb

 
A100:

have made an uncomfortable single-width font, which reduces the usefulness of the output by up to 40%.

On the contrary, I like monospace because I've been using it a lot since ArrayPrint came out.

 
fxsaber:

I've been using ArrayPrint extensively since it came out.

If it were, this and other bugs would have been identified long ago, which also manifest themselves in the form of dots, which make its use meaningless.

MetaEditor build 1467
MetaEditor build 1467
  • 2016.11.10
  • www.mql5.com
Объясните, почему вот этот текст, отформатированный исключительно пробелами, нет ни одного -tab-,: после применения стилизатора, преобразуется в та...
Reason: