Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1243

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
I originally relied on this article:https://www.mql5.com/ru/articles/43
But the code there is only up to the moment of checking and getting indicator data into buffer arrays, further there is no example how to work with received indicator data. I looked through the reference book, there are mainly code examples for indicators, I picked up setindexbuffer from it. I want to know which way to "dig". I got tired of it yesterday, I've spent half a day here.
Tried it already. But in the wizard it generates there with classes. I would at least like to understand the code in a simple way - the code I understand at least a little bit. Could you please advise how to correct the code in order to get indicator values in the EA?
Example: How to get iEnvelopes indicator values from EA
Result:
Example: how to get iEnvelopes indicator values from an EA
Thank you very much! I will look into it!
Vladimir, please tell me: where does it get UPPER_LINE and LOWER_LINE from? If we only got the indicator handle, did we get it straight from the handle?
Vladimir, please tell me: where does it get UPPER_LINE and LOWER_LINE from? If we only got the indicator handle, did we get the handle at once too?
I do not understand your question. It is a set of letters without meaning. Please rephrase your question - do not hurry to type, think over your question and type calmly.
I don't understand your question. A set of letters with no meaning. Please rephrase your question - don't rush to type, think about your question and type calmly.
In the argument of the function:
iGetArray(handle_iEnvelopes,UPPER_LINE,start_pos,count,upper)
you used UPPER_LINE.
Where does this parameter value come from, from the handle you got earlier:
?
In the function argument:
you used UPPER_LINE.
Where does this parameter value come from, from the previously received handshake:
?
No. This value is taken from the iEnvelopes help
Afternoon. When running the EA on GBPUSD currency, I set the indicator in the code for EURUSD, the EA crashes on startup. However, if I run the Expert Advisor on EURUSD and specify GBPUSD as the indicator, everything works. What can it be related to?
Afternoon. When running an EA on GBPUSD currency, I set an indicator in the code for EURUSD, the EA crashes on startup. However, if I run the EA on EURUSD and specify GBPUSD as the indicator, everything works. What can this be due to?
1. Generate an EA using Wizard MQL5 - for example, specify 'GBPUSD' for the EA and 'EURUSD' for the module of signals. You will get a RIGHT sample code. Study the code. In the future, just avoid manual editing, and generate the code using the MQL5 Wizard.
2. If you specified 'GBPUSD' for an Expert Advisor, you should run this EA ONLY on 'GBPUSD'.
1. Generate an EA using Wizard MQL5 - specify for example 'GBPUSD' for the EA and 'EURUSD' for the signal module. You will get a RIGHT sample code. Study the code. In the future, just avoid manual editing, and generate the code using the MQL5 Wizard.
2. If you specified 'GBPUSD' for an Expert Advisor, then you should run this EA ONLY on 'GBPUSD'.
Vladimir, I generated the code using MQL5 Wizard. I tried your EA, it also does not work for me when I run it on GBPUSD currency.
It says the following in the log: