MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released - page 61

To add comments, please log in or register
Alain Verleyen
39545
Alain Verleyen  

As a reminder :

Build 613/614 are not official release but beta release only available through Metaquotes-Demo or Test servers.

It can happen that your terminal connected to other brokers are also updated if you have one terminal connected to one of the Metaquotes servers.

Dennis
24
Dennis  
@ angevoyageur, where can i review the update history of the mt4?
Alain Verleyen
39545
Alain Verleyen  
investor89:
@ angevoyageur, where can i review the update history of the mt4?
In your log files. File Menu, Open Data Folder, then logs subfolder.
darksamu
13
darksamu  

I think I've found a bug in builds 613 and 614.

If you open a file for writing, fill it up with data, then go back to beginning of the file and change e.g. the first 4 bytes, all the other contents of the file will be deleted. In builds 610 (and older) only the 4 bytes were changed and the other parts of the file wouldn't be touched.

Here is an example code:

//+------------------------------------------------------------------+
//|                                                       FLtest.mq4 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2014, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
{
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{

   int i, change, flhandle;



   flhandle=FileOpen("test.bin", FILE_BIN|FILE_WRITE);
   if (flhandle>0)
     {
        for(i=0; i<100; i++)
          {
             FileWriteDouble (flhandle, i, 4);
          }

        FileSeek(flhandle, 0, SEEK_SET);                        // goes to beginning of file
        change=45;
        FileWriteDouble(flhandle, change, 4);                   // writes 4 bytes to the beginning of file

        FileClose(flhandle);
     }



   return(rates_total);
}

The code above gives a 400 byte file in build 610, however in build 613 and 614 test.bin will be only 4 bytes in size.

Simon Gniadkowski
17239
Simon Gniadkowski  
darksamu:

I think I've found a bug in builds 613 and 614.

If you open a file for writing, fill it up with data, then go back to beginning of the file and change e.g. the first 4 bytes, all the other contents of the file will be deleted. In builds 610 (and older) only the 4 bytes were changed and the other parts of the file wouldn't be touched.

Here is an example code:

The code above gives a 400 byte file in build 610, however in build 613 and 614 test.bin will be only 4 bytes in size.

How can you FileSeek() without opening the file for reading ? try adding FILE_READ to your flags.

This might help also: https://www.mql5.com/en/forum/108526
Alain Verleyen
39545
Alain Verleyen  
RaptorUK:
How can you FileSeek() without opening the file for reading ? try adding FILE_READ to your flags.

This might help also: https://www.mql5.com/en/forum/108526
FileSeek has nothing to do with read/write.
darksamu:

I think I've found a bug in builds 613 and 614.

If you open a file for writing, fill it up with data, then go back to beginning of the file and change e.g. the first 4 bytes, all the other contents of the file will be deleted. In builds 610 (and older) only the 4 bytes were changed and the other parts of the file wouldn't be touched.

Here is an example code:

The code above gives a 400 byte file in build 610, however in build 613 and 614 test.bin will be only 4 bytes in size.

It's a bug. Can you please report it to ServiceDesk of Metaquotes (you have to register at mql5.com) ?
darksamu
13
darksamu  
angevoyageur:
FileSeek has nothing to do with read/write.It's a bug. Can you please report it to ServiceDesk of Metaquotes (you have to register at mql5.com) ?

Ok, I submitted the bug to Service Desk.
Alain Verleyen
39545
Alain Verleyen  
darksamu:

Ok, I submitted the bug to Service Desk.
Thank you.
mt_nix
34
mt_nix  
Where can I download the latest mt4 build?
darksamu
13
darksamu  
ArturZ:
Where can I download the latest mt4 build?

Connect to demo.metaquotes.net:444 from your MT4 and it will update itself automatically.
To add comments, please log in or register