[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 307

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
It's not a fitting, it's a kind of auto-fitting :)
A fit without a firm mark is a fit.
Until the main parameters work properly, they must be defined by thinking, trying, testing in the tester, in the demo and in the real game, and so on, until something new comes to your mind that seems better. And all without adjustment, but by logic, theory and practice!
Any variable must first be declared before it can be used. It can be in parameters, it can be at the global library level.
Not only that, it must also be explicitly initiated.
So here's a function from the library:
Vadim, about functions in the loop You mean what the switch operator returns? But it's not like I'm getting values over the whole number of loop variables. It's just comparing the type of the mask (input variable of the function) I'm getting and then calculating the value of the mask. It turns out that there are no additional calculations. I just select the type of the mask, and that's it! I want to understand what you mean by:
Can you explain?Not only that, it must also be initiated explicitly.
One more thing: I have encountered a strange (for me) behaviour of UninitializeReason(). I check its value in the Inite, and if the timeframe has been changed and there are open positions, then I need to issue a request to close them. If we initially run the EA on M5, and then switch to another timeframe, then there will be no request. If we go back to the initial TF (M5), there will be a request. I think this is not normal. I need to have a request at any change of TF.
Can anyone explain?
One more thing: I have encountered a strange (for me) behaviour of UninitializeReason(). I check its value in the Inite, and if the timeframe has been changed and there are open positions, then I need to issue a request to close them. If we initially run the EA on M5, and then switch to another timeframe, then there will be no request. If we go back to the initial TF (M5), there will be a request. I think this is not normal. I need to have a request at any change of TF.
Can anyone explain?
Make it work, DeinitReason is a global variable
Make it work, DeinitReason is a global variable
Good afternoon.A new question has arisen.Help please.For the knowledgeable there is a minute, but for beginners is difficult.Googled nothing helps, but maybe someone has faced.
The journal says
(2013.04.23 10:06:30 2013.04.01 00:00 xrust EURUSD,M1: 2 parameter for SetIndexBuffer function must be array).
https://forum.mql4.com/ru/55137#786974
Good afternoon.A new question has arisen.Help please.For the knowledgeable there is a minute, but for beginners is difficult.Googled nothing helps, but maybe someone has faced.
The journal says
(2013.04.23 10:06:30 2013.04.01 00:00 xrust EURUSD,M1: 2 parameter for SetIndexBuffer function must be array).
https://forum.mql4.com/ru/55137#786974
It says that the second parameter in SetIndexBuffer function must be an array. That is, not double znach1, but double znach1[]