[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 245
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Have you tried error handling?
No. What good would that do? You'll have to do another query anyway.
You'll know why there's no data, and maybe it's pointless to repeat the query.
No. What good would that do? You will have to do another query anyway
Just to be safe, I'll ask. Question about MQL4 specification. If according to MSDN documentation the called function has a pointer in its parameters, in MQL4 I can use passing of the parameter by reference, right?
At least in C++
What data from other currencies and timeframes do you need: standard or custom indicator, price, something else? Show me the part of the code where you don't succeed.
In fact, you don't need anything else except OHLC. And it's not about the code. When charts are open, timeseries are created in virtual memory and all incoming quotes are stored in the main memory without being written to history files. History files are written only when we close MT4. When requesting data without opening the corresponding chart, the time series are not created, but the downloaded data are directly written to the history files. In order to get this data, we need to query again and only in this case we will get fresh data (from the file). I wanted to try to simulate in some way the presence of an open chart, in order to get the data from RAM rather than from a file.
To be honest, I've never really delved into such processes. I wonder what type of task you need to know this for?
gyfto:
Is this okay?
Looks like it'll work... Here's the code for the indicator:
In the initial parameters of the tool, "empty" is specified instead of the path to the application, in the output it returns (in the log) its handle and full path. And then...
It seems to fit... Here is the code of the indicator:
The initial parameters of the indicator specify "empty" instead of the path to the application, in the output it returns (in the log) its handle and full path. Next...
Why does the first line use a string buffer, and the second uses an integer array?
What prevents you from using an initialized string in both cases? It would cut the code down by a dozen lines.
Zhunko:
What prevents you from using an initialised string in both cases?
The log says function 'GetModuleFileNameA' call from dll 'kernel32.dll' critical error c0000005 at 7C902128 in case of string declaration. I still don't understand why. On the surface - terminal crashes about 3-7 seconds after opening, no time to write anything in logs, i.e. terminal closes not by itself.