Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1479
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
Outputting variables to the global scope is not passing arguments to a function...
Put & before variable names at the input to the function and all problems will be solved.
Hi Alexey, so that's the problem!!! Thank you very much, dear! All my head was broken, I thought there was something else missing! It turned out that brains are not enough!!!! ))
Regards, Vladimir.
Put & in front of variable names on function input and all problems will be solved
I found and watched the video about functions with references. From this video lesson I realised that I need not just an MQL5 lesson for beginners, but an MQL5 lesson for especially gifted beginners with stupidity. In short, I didn't understand anything. In general, you need to digest all the information you have received and re-watch this video five or even six times. But there will be something to do in my spare time! ))
Regards, Vladimir.
I found and watched a video about functions with links. From this video lesson I realised that I need not just an MQL5 lesson for beginners, but an MQL5 lesson for beginners who are especially gifted with stupidity. In short, I didn't understand anything. In general, you need to digest all the information you have received and re-watch this video five or even six times. But there will be something to do in my spare time! ))
Regards, Vladimir.
Do not waste time, even if you have nowhere to spend it. The name of the "teacher" speaks for itself, a dilettante is a dilettante.
This video is only useful to you for 3 minutes. And the rest is only distracting and you lose useful information.
It is better to read the documentation carefully, experiment with examples and you will understand everything.
Don't waste time, even if there's nowhere to waste it. The name of the "teacher" alone speaks for itself, an amateur is an amateur.
There's only 3 minutes of useful information in this video. The rest is just a distraction and you lose useful information.
It is better to read the documentation carefully, experiment with examples and you will understand everything.
Thank you, Alexey, I thought that the video lesson would be more informative and useful for me, but it turned out to be exactly the opposite. As for the MQL5 Reference Manual, the Parameter Transmission section, I read it in the same way, but it turned out like the famous saying: "I look in the book, I see the figure!". I didn't understand anything. In short, of course, I will reread and experiment a few more times, I don't have much choice. ))
Regards, Vladimir.
After watching the video tutorial and reading about passing arguments by reference in the MQL5 Reference Manual, it seems to be more or less clear. However, having analysed the code presented in the Reference Manual, one fragment still caused perplexity, although, in my opinion, it has nothing to do with passing arguments by reference:
In this regard, I have a question for MQL5 programming experts - why the hell did they "shove" the SecondMethod(a,b ) function into the d variable in OnStart( )? Is it a prerequisite for the correct operation of the script, or is there something I have misunderstood again?
Regards, Vladimir.
Help me, please.
There are many arrays with time, and the time of some elements in these arrays can coincide.
I need to collect them into one array without repeating time values.
I did it this way:
But it turned out to be a very slow code. It needs to be faster. How to ????
In this regard, I have a question for MQL5 programming experts - why the hell did they "shove" the SecondMethod(a,b ) function into the d variable in OnStart( )? Is it a prerequisite for the correct operation of the script and I have misunderstood something again?
Regards, Vladimir.
The variable d is assigned the result of the function execution
Thank you, Artyom, for your response! Isit impossible to use just the function SecondMethod(a,b) without assignment?
Regards, Vladimir.
Thank you, Artyom, for your response! Isit impossible to use just the function SecondMethod(a,b) without assignment?
Regards, Vladimir.
Can. Then two values will be received - only in the variables passed by reference. That is, the function returns three values
For the sake of interest, I removed the d variable. I left only the function. The result of printing has not changed. To be honest, I don't understand about the three values at all.
Regards, Vladimir.