Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 164

 
-Aleks-:

No, I need to get the value from the function - _High and _Low is just an example...

You get the High and Low of the calculated bar in the function
int BarPeresek_iMAf(int PeriodMA)
 
Nikolay Gaylis:

This is what you will get from the function.

I mean that it may not be High[] and Low[], but the intermediate calculations of calculations - I just don't want to lay out a huge function - not many people will understand it.
 
-Aleks-:

No, I need to get the values from a function - _High and _Low is just an example...

I wrote you how to get these values from the function
 
Nikolay Gaylis:

I wrote you how to get these values from the function.

All right - you wrote about High and Low, but now let's imagine that it is not High and Low but an intermediate result of the function.
 
-Aleks-:

All right - you wrote about High and Low, but now let's pretend it's not High and Low, but some intermediate result of the function calculation.

Give me an example - let's decide... Are you using the last function exactly?
 
Create a structure, pass it to the function by reference, fill it in there. When the function finishes, all the data you need will be in the fields of the structure.
 
Nikolay Gaylis:

Give me an example... Do you use the last function you posted?

I'll think of another example.

Yes, I do, of course.
 
Artyom Trishkin:
Create a structure, pass it to the function by reference, fill it in there. When the function finishes, all the data you need will be in the fields of the structure.

Uff, it sounds complicated and not clear, but can I use my function as an example?
 
-Aleks-:

I'll think of another example.

Yes, I will, of course.

What other variables do you want to get out of it, apart from High and Low?
 
Nikolay Gaylis:

which variables do you want to get from it, apart from the ones you already got High and Low?

OK, let's say these :

int TFT=0;
int shiftMAT=0;
int typeMAT=0;
int priceMAT=0;