[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 514
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Then goodbye. It is useless to teach a scientist. So let's not mock you if you're already all business.
Why send you away at once? There is nothing in the textbook about parameter transfers at the link. Why should I read the same thing 100 times? I asked a specific question. I've read the textbook a bunch of times. And I looked through it today, there's nothing in it about transferring parameters by reference!
Why send them away at once?
Because I'm sick and tired of having conversations with literate people.
Your logic is strange. I did not call myself a literate. And the fact that there is not a single word in the so-called textbook on the subject I am interested in, it is the fault of its author, not mine... Why accuse me?
This thread is for newbies, not total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.
Show me in a textbook answer to my question and I will not appear here again, if you so desire...
Your logic is strange. I did not call myself a literate. And the fact that there is not a single word in the so-called textbook on the subject I am interested in, it is the fault of its author, not mine... Why accuse me?
This thread is for newbies, not total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.
Show me in a textbook answer to my question and I will not appear here again, if you so desire...
Can you tell me how to buy a trading robot ?
Please tell me how to buy a trading robot ?
You will find a salesman in Work! But note, there is no such thing as a robot that gives you income all the time. So you have to learn programming in order to constantly edit the parameters and even the algorithm of the program. Or become an investor, if you have money! Good luck!
Victor, you don't have to use parameter passing by reference (you had it initially). Pass it by value - it won't change the essence. Actual parameters must be predefined in calling program, formal parameters in called program. I hope you don't have any complaints to Kovalev?
Alexey, I understand that you can not use transfer by reference, and make these variables global... so that all f's see them... BUT why do it? If no other function will use certain EA variables, it's not reasonable to make them global. I understand that there are other ways to solve this, and I can do it in a different way, so the code compiles and EA works, but I want to learn how to pass parameters by reference, to be able to do it in the future.
(you had it originally).
If it was, why isn't it working?
The actual parameters must be predefined in the calling program, the formal parameters in the called program.
And how would it look in my case?
I hope there are no complaints against Kovalev?
No, of course, it couldn't cover all the programming topics that exist.
I want to learn how to pass parameters by reference so that I can do it in the future.
If there was one, why isn't it working?
So how would this look in my case?1. Simply specify the variables passed by reference with an ampersand in the list of formal parameters.
2. It doesn't work because it's not declared in the calling program.
3. Simply, declare variable types in special start function and make sure they are initialized. I recommend "old-school" approach: declarations first, procedures after.
SZ by reference is not an alternative to global variables. There's no such thing as a subroutine in C, there's only a function and a function has only one value. If you need a subprogram (with a lot of returned parameters), then use data passing by reference. In general, this is a very arbitrary abstraction - it's closer - the Common block from Fortran.
In short: when passing by reference, caller and called programs use the same memory space for passed variables/arrays. Formal parameters make actual sense, only their names don't matter.
1) Your logic is strange. I did not call myself a literate. And the fact that the so-called textbook on the matter of interest to me, there is not a single word, it is the fault of its author, not mine.
2. Why accuse me?
3. this is a thread for newbies, not for total ignoramuses who haven't read your textbook. I've been through it several times. I asked you a specific question, the answer to which is not in your textbook! Why this attitude towards me? Because there is a certainVladislavVG, who likes to send everyone to a textbook? I have already seen him do it more than once.
...
1. Naturally, and who else! + do not understand why he did not lay out the GRAAL!!!? :-) Check your hands! ( Learn to use Google.
2. No one has accused you.
3- Without familiarity with the ABC and the Base, by - past the tutorial and the doki - I gave you references page by page earlier + use google, queries like "transfer parameters via link", "transfer parameters via link site:mql4.com" - to get out with questions on the forum, at least - mauvais ton!
Everything, IMHO!