I run this EA on 34 charts at same time.
it get stuck in the do-while loop with the error : 4025 [Out Of Memory].
-
No idea. You probably should place a Mutex at the start of the function so only one thread can download at a time.
Prevent EA from opening trades at the same time across two or more pairs? (Steve) - MQL4 programming forum (2016) -
You should find out what line is giving the error.
#define LOG(text) Print(__FILE__,"(",__LINE__,") :",text) // one parameter - 'text'
-
No idea. You probably should place a Mutex at the start of the function so only one thread can download at a time.
Prevent EA from opening trades at the same time across two or more pairs? (Steve) - MQL4 programming forum (2016) -
You should find out what line is giving the error.
Simplified, standalone version: Prevent EA from opening trades at the same time across 2 or more pairs? - MQL4 programming forum - Page 2
#include "mutex1.mqh" void Download_News() { Mutex m; if(FileGetInteger(…
I have the same error (4025) on WebRequest. This is my code:
string cookie = NULL, headers; char post[], result[]; string ret = ""; int res; //--- to work with the server, you must add the URL "https://www.google.com/finance" //--- the list of allowed URL (Main menu-> Tools-> Settings tab "Advisors"): string google_url = "http://ec.forexprostools.com/?columns=exc_currency,exc_importance,exc_forecast,exc_previous&importance=1,2,3&calType=week&timeZone=15&lang=1"; //--- //--- download html-pages int timeout = 10000; //--- timeout less than 1,000 (1 sec.) is insufficient at a low speed of the Internet ResetLastError(); res = WebRequest("GET", google_url, cookie, NULL, timeout, post, 0, result, headers); //--- error checking if (res == -1) { //--- You must add the address ' "+ google url"' in the list of allowed URL tab 'Advisors' "," Error " if (_LastError == 4060) MessageBox("You must add the address 'http://ec.forexprostools.com/' in the list of allowed URL tab 'Advisors' ", " Error ", MB_ICONINFORMATION); else if (_LastError != 5203) Print("WebRequest error, err.code = ", _LastError); } else { //--- successful download ret = CharArrayToString(result); }
MT4 build 1360

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I run this EA on 34 charts at same time.
When he folder \MQL4\Files is Empty before the EA being Initialized the code download correctly all the 34 files.
After 4 hours the function is run again, this time tries to rewrite all the 34 files, every single time after 5-10 files downloaded and rewritten it get stuck in the do-while loop with the error : 4025 [Out Of Memory].
I have no idea how to fix this. I prefer solving it without use .ddl dependencies, because they seems more complicated to me and faced several problems time ago.
Is there a good soul who would help me fixing this?
If you need more code I will provide it.