Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 580
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
Do it that way. The code is almost correct. There's only one word missing:
Hello! Help me solve the problem. I need to get data from one EA for different symbols/TF. The Help says:"The mechanism of access to the server for data does not depend on how the request was initiated - by a user when navigating a chart or by a program in MQL4". However, in practice, if in real time, for example, if we track the number of bars on a symbol/TF different than the symbol on which the EA is running, the following happens The new symbol loads a small number of bars on the first access (around 1000 for M1) and this number does not change. I have tried different functions to access timeseries, I have tried to specify displacement of bars and time deeper in the history than it is loaded at the moment, I have tried to move the ChartNavigate(_ID, CHART_BEGIN) - new data are not loaded and the number of bars does not change. However, if I open a window programmatically from the same Expert Advisor (I have opened it before for the ChartNavigate() function) and move the chart to the left using arrow/Home/PgUp button, it leads to the increase of timeseries arrays, the number of bars is increased in real time, i.e. the data is loaded. What needs to be done to load the history programmatically without pressing physical keys on the keyboard? Thanks)
You have to be more explicit about the question. If the problem is not posed, it cannot be solved.
Can you tell me how to get the bottom indicators from a timeframe other than the one on which the owl is hovering?
It works, but not always correctly. I attached the objects for visual assessment. Please advise or where to look.
What is DRAW_LINE for?
What is DRAW_LINE for?
Hello. How do I know the closing price at M30 if the EA is on the H1 chart?
Hello. How do I know the closing price at M30 if the EA is on the H1 chart?
I like it when people ask a question and answer it themselves ))
Basically, everything is correct. There is just one subtle point: before using data obtained from another timeframe, we have to make sure that this data exists at all.
So the full correct code would look like this
I like it when people ask a question and then answer it themselves ))
By and large everything is correct. There's just one nuance: before using data from another TF, you need to make sure that this data exists at all.
So the full correct code would look like this:
Thank you, action only after H1 close, but the condition is met 30 minutes before H1 close.
Thank you, the action is only after the H1 close, but the condition is met 30 minutes before the H1 close.
If you want to take the M30 candle that closed with the last H1 close, it can be a candle with index not only 1, but also 2. Another thing is that then it is not clear why the closing price of M30 is taken when it is the same closing price for the previous H1 candle. That is, in this case there is no sense to interrogate the closing price of another TF, because it coincides with the closing price of the current TF.