Hello.
There is a problem with transferring files to VPS MQL.
I am creating a file to transfer global variables from the current terminal.
#define defGlobalName "ALL_GLOBAL2024.csv" #property tester_file defGlobalName bool GlobalVariableToFileSet( string path) { string buffer= GlobalVariablesTotal (); int Handle; string File_Name=path; ResetLastError (); Handle= FileOpen (File_Name, FILE_CSV | FILE_WRITE ); int FileError= GetLastError (); if (Handle== INVALID_HANDLE ) { if (FileError== 4103 || FileError== 5004 || FileError== 5020 ) { PrintToLogs( "File Error " +FileError); return ( false ); } else if ( GetLastError ()!= 0 ) { return ( false ); } } FileWrite (Handle,buffer); string buffer2= "" ; for ( int i= 0 ; i< GlobalVariablesTotal (); i++) { FileWrite (Handle, GlobalVariableName (i)); FileWrite (Handle, GlobalVariableGet ( GlobalVariableName (i))); } FileClose (Handle); return ( true ); }
When synchronizing with VPS MQL, the file is transferred normally the first time. All global variables are read normally.
But. When changing global variables and new synchronization of the same file -
ERROR. The new file is not transferred to the server. All old data (from old global) is read.
#define defGlobalName "ALL_GLOBAL20242.csv"
I read it the same way:
bool GlobalVariableToFileGet( string path) { long Handle; string File_Name=path; //--------------------------------------------------------------- 3 -- Handle= FileOpen (File_Name, FILE_CSV | FILE_READ | FILE_SHARE_READ , ";" ); int FileError= GetLastError (); if (Handle< 0 ) // Неудача при открытии файла { if (FileError== 4103 || FileError== 5004 || FileError== 5020 ) return ( false ); else PrintToLogs( "error " +File_Name+ " " +FileError+ " File not ready" ); return ( false ); } int TotalVar= FileReadString (Handle); PrintToLogs( "GlobalVariableToFileGet from" +File_Name+ " TotalVar=" +TotalVar); for ( int i= 0 ; i<TotalVar; i++) { string nameGlobal= FileReadString (Handle); string valueGlobal=( FileReadString (Handle)); if (nameGlobal!= "" && valueGlobal!= "" ) GlobalVariableSet (nameGlobal, StringToDouble (valueGlobal)); } FileClose (Handle); // Закрываем файл return ( true ); }
The same thing happens with global variables.
New global variables are not transferred during synchronization.
I have already removed all global variables.
But the old glob variables still hang on the server.
And they are not deleted.
I added an output of the date of the last modification of the file, and here you can see that there is already a new file on the computer, but there is still an old file on the server (which was downloaded back)
Needed for the panels to work on the server MQL.
Thank you.
After updated to 4260 MessageBox() always return 0 whether Yes or No is selected.
int mb_id = ::MessageBox(Msg, SCANNER_NAME, MB_YESNO|MB_ICONQUESTION); printf(mb_id);
Strategietester with local agents works very very slow after update to 4260. It's not usable!!.
In my test case I used to option to test the expert with all Symbols and the the list. Ok, it use less CPU - but all performance was lost!!!!
Strategietester with local agents works very very slow after update to 4260. It's not usable!!.
In my test case I used to option to test the expert with all Symbols and the the list. Ok, it use less CPU - but all performance was lost!!!!
I'm having this problem since the version 4230. In my case each agent is using too much memory draining out everything until start to bottleneck the cpu. Sometimes it crashes the desktop and I need to sign in again.
My account is in USD and I noticed that when I test a pair where the last currency is USD (xxxUSD) I have no problem, the cpu goes to 100% and the memory stays around 40% which is nornal in any other pair I have the problem.
I'm unable to use mt5 for 2 weeks now due this problem.
I've read on old posts that they had some problem with mt5 and AMD processors, I wonder if this problem is back.
I have a AMD Threadripper 3995wx Pro 256GB Ram with Win 11 and Win 10.
int mb_id = ::MessageBox("Try choosing Yes.", "Test", MB_YESNO|MB_ICONQUESTION); bool bStartEA = (mb_id == IDYES); if (bStartEA) { printf("Selected Yes!"); }
Please re-complie and check again. After updated to 4260, I selected Yes of MessageBox() but can not excute "printf("Selected Yes!");"
Please re-complie and check again. After updated to 4260, I selected Yes of MessageBox() but can not excute " printf("Selected Yes!");"
I'm using my own code (simple).
and everything works as standard for me.
if(MessageBox("Do you really want to Close ALL Positions and Orders in This EA, opened with EA?","Close ALL",MB_YESNO|MB_ICONQUESTION)==IDYES) CheckPressedOpen=true;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The MetaTrader 5 platform update will be released on Friday, March 22, 2024.
The new version enhances keyboard event handling capabilities in MQL5 programs. Developers can now capture key release and dead key events, improving interaction between applications and users.
The MetaEditor has introduced a new search option to assist users in navigating through the contents of the recently released book Neural Networks for Algorithmic Trading in MQL5. The web platform update provides fixes to limit setting procedures for exchange instruments.
MetaTrader 5 Client Terminal
They have been replaced by a single method with a constant return value:
This modification will assist in capturing incorrect use of the result in place as in the new Alglib version, the code mat[row][col]=x operates differently from the old version. Previously, this indicated writing to a matrix. Now, the value is written to a temporary object vector<double/complex>, which is immediately destroyed after recording.
Adding const to the return value enables the use of mat[row][col]=x. Because mat[row] now returns a constant vector, attempting to overwrite its element with mat[row][col] will result in a compilation error.
MetaTrader 5 Web Terminal
The update will be available through the Live Update system.