MetaTrader 4 Build 529 beta released with new compiler - page 43

 
stringo:
It was fixed. Thanks


Alas, it has been fixed, but not everything.

iVolume shows that.


It remains to fix the return value type in the documentation.

Experimentally it turned out to be long,

not datetime, as written, and not double, as before.

Thank you for your attention.

 
Is it just me, or does the beta version really run faster (I have Win XP)?
 

To the developers

Is thestrategy tester working at all or what?

I am testing the standard MACD on EURUSD. Trading account is the same, parameters are the same, symbol is the same.

On 509 trades are executed, but on 538 they are not.

If I need it I will send you the details.

 
thecore:

Experimentally it turned out that it is long,

not datetime as written and not double as before.

By the way, this data type is not described on the site (in documentation) :)

And it is more logical, in my opinion, to return ulong.

 

Time accurate to ms in the log - cool!

But the score history doesn't even show seconds )

 
Double-clicking from favourites leads to code editing
 
"File - Open remote" opens some left-hand (default but not default) template.
 

If you read a line from a file and then write the same line, an extra line break is added:

        string file_name = "test.txt";
        int handle  = FileOpen( file_name, FILE_TXT | FILE_READ | FILE_WRITE | FILE_ANSI | FILE_SHARE_READ ), _GetLastError = 0;
        if ( handle < 0 )
        {
                _GetLastError = GetLastError();
                if ( _GetLastError != 4103 ) Print( "FileOpen() - Error #", _GetLastError );
                return(false);
        }

        string temp_command;
        FileSeek( handle, 0, SEEK_SET );

        while ( !FileIsEnding( handle ) )
        {
                ulong command_start = FileTell( handle );
                temp_command = FileReadString( handle );
                if ( temp_command == "" ) continue;

                FileSeek( handle, command_start, SEEK_SET );
                FileWrite( handle, temp_command );
                break;
        }

        FileClose( handle );

Appears from line 2 onwards (the first line is OK). In 509 it was ok.

I suspect this is the issue:

FileWriteString

Writes to a BIN, CSV or TXT type file the value of a string type parameter from the current position of the file pointer. When writing to a CSV or TXT file, if there is a '\n' character (LF) without a preceding '\r' character (CR) in the string, the missing '\r' character is appended before the '\n' character.

But I'm not sure if this applies to FileWrite as well. I still don't know what to do with it.

Should I write it into the service-desk?

 
komposter:

If you read a line from a file and then write the same line, an extra line break is added:

Appears from line 2 onwards (the first line is OK). In 509 it was ok.

I suspect this is the issue:

But I'm not sure if it applies to FileWrite as well. Still not sure what to do about it.

Should I write to the service-desk?

Please write with all the details. So as not to get lost.
 
komposter:

If you read a line from a file and then write the same line, an extra line break is added:

int handle  = FileOpen( file_name, FILE_TXT | FILE_READ | FILE_WRITE | FILE_ANSI | FILE_SHARE_READ )   ,   _GetLastError = 0;
;?
Reason: