Questions from Beginners MQL5 MT5 MetaTrader 5 - page 991
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
That's exactly what I thought. The issue of misunderstanding is the word "parameters". So I started looking at ALL the variables that are involved in the handle --> CopyBuffer
1) My question from the beginning was to switch the timeframe SCREEN to save the handle data. As it is in MT4.
And in fact it turns out so:
ALWAYS and on ALL timeframes gives the same value of 10
Having got nothing here I moved on.
2) And I quote:"Gets the data of the specified buffer of the specified indicator in the specified amount into the buffer array".
That is, by settingthe count by hand we should have an INTERVAL with the values . And there they are! BUT!!!!!! Only when the handle period corresponds to
PERIOD_H1timeframe on the monitor screen. All values are transmitted clearly. But moving to another timeframe, there is NO data on the screen.
They are NOT transmitted in any way!!!! And my question was exactly that. And the number of bars is not so important here if they are NOT there!!!!
I looked at the proposed indicatorMTF_LRMA.mq5 but it's the same. It switches to another timeframe on the screen and the data goes by the screen timeframe. I need it on a handheld.
For example: iClose(NULL, PERIOD_H1, 5); on all timeframes it will give the same value - 10 bars on H1.
So far all examples were on CopyBuffer count correction. But the array is empty.
You are wrong. Handle gives data at any timeframe. I will give you an example in about 10 hours. I will not be able to do it from my mobile.
OK. Thanks for the reply.
Corrected myself.
I thought it may be like this
But if you change my mind, I will wait for the first method to get the value of the technical indicator (iMA). But I still do not understand.
OK. Thanks for the reply.
Corrected myself.
I thought it may be like this
But if you change my mind, I will wait for the first method to get the value of the technical indicator (iMA). But I don't understand it now...
I showed above that the number of bars on different TFs is different, and therefore different number of bars to copy, depending on the TF where the indicator should be calculated. You should check the number of bars, calculated by BarsCalculated() and use it as a basis.
I have shown above that the number of bars on different TFs is different, and therefore you should request different number of bars to copy, depending on TF, which should be calculated by the indicator. You should check the number of bars, calculated by indicator via BarsCalculated() and use it as a base, here is a piece of example for MTF
Thank you. I'll give it a try. But as pointed out earlier, the array is empty altogether. I've been doing handwritten sdigs on the array. It's all empty.
Are you ignoring that you have to wait for data to load from a different timeframe? I have given you examples. The data in the shown indicator is taken only from higher timeframes. If we set lower or equal to the current timeframe, the data is taken from the current one. It all is in the code, but you haven't reviewed it. But you are making a statement.
Not only did I look, but I took your indicator apart piece by piece. Here was the idea about the data delay from the very beginning. And immediately, from the first viewing, I saw your Timer. I'll look in that direction.
for now
other (non-native) timeframe
for now
other (non-native) timeframe
I'll try. I will try it. But as I pointed out before, the array is empty at all. I used my hands to make readings of the array. It's all empty.
Earlier I gave you a piece of code of your indicator with print, did you try to copy it? Nothing appears in the log, no errors or numbers?