Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1151
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
The error could be in the number of digits after the decimal point:
I have such a problem: I've just started in MT5, I'm transferring my indicators from MT4 and I've encountered some problems. I need to use iMA in one line and get the value of one specific index. I've seen messages on forum and use iMAGet function (as well as similar iATRGet etc.). As I see, the functions no longer work, then this question: how to gracefully get one single iMA value? I've tried using the above functions to do this:
This :
Into something that works on MT5 without any drastic gestures.
Good afternoon, gentlemen.
I have a problem, I have just started MT5 and I have problems with it when I transfer my indicators from MT4. I need to use iMA in one line and get the value of one specific index. I've seen messages on forum and use iMAGet function (as well as similar iATRGet etc.). As I see, the functions no longer work, then this question: how to gracefully get one single iMA value? I've tried using the above functions to do this:
This :
Into something that works on MT5 without any drastic gestures.
Check out the examples in kodobase, such as this one:https://www.mql5.com/ru/code/27161
Basically: create an indicator handle in OnInit()
Then you copy the necessary element(s) to the clipboard and work with it
https://www.mql5.com/ru/docs/series/copybuffer
Look up examples in the kodobase, e.g. this one:https://www.mql5.com/ru/code/27161
Basically: Create indicator handle in OnInit()
Then you copy the necessary element(s) to the buffer and work with it
https://www.mql5.com/ru/docs/series/copybuffer
As I have already written, initialization in OnInit is not suitable for me. I have work with all timeframes simultaneously, I have to initialize all masks in each TF, and then in code, where I use some value, do something like this:
And so with every call of each wristband. The code will just turn into a confusing diarrhea.
And every new bar will need to update it somehow?
Is there a function like CopyBuffer, but copying not an array, but one value by required index?
As I have already written, initialization in OnInit is not suitable for me. I have work with all timeframes simultaneously, I have to initialize all masks in each TF, and then in code, where I use some value, do something like this:
And so with every call of each wristband. The code will just turn into a tangled diarrhea.
And every new bar will need some way to update it?
Is there a function like CopyBuffer, but copying not an array, but a single value by the right index?
Make an array of handles inOnInit() and work with them.
CopyBuffer(...) into function for usability, feed it with indicator handle and required index from array, and function will return the price
Make an array of handles inOnInit() and work with them.
CopyBuffer(...) into a function for ease of use, pass the indicator handle and the required index from the array, and the function will return the price
very inconvenient, though)
(it's awkward, though))
More like uncomfortable ))))
Make an array of handles inOnInit() and work with them.
CopyBuffer(...) into function for usability, there you feed the indicator handle and the required index from the array, and the function will return the price
The other problem of CopyBuffer is that it necessarily requires the indicator buffer for itself. I have a hundred indicators in total and they are used in calculations to get one single indicator. Do I need to create a hundred buffers to store these values?
Another problem with CopyBuffer is that it necessarily requires an indicator buffer for itself. I have under a hundred indicators in total and they are used in calculations to get one single indicator. Do I need to create a hundred buffers to store these values?