How to get the maximum and minimum price from a vertical line, - page 2

 
Manuel de los Heros Soler # :

Hi Vitaly!

               Thank you very much for the code. I've tried it and it's perfect. Vitaly I have looked at myself and studied your code and there is part that I don't know what it does, would you be so kind as to explain to me what it does to learn it better?
               Thank you very much in advance and forgive my English.


             I think I know all the "if" functions but this "if" with the "return" and the rest confuses me and I don't know if it's part of the "if" or not.
All the best

It's in the documentation:

https://www.mql5.com/ru/docs/array/arraymaximum

Return Value

The function returns an index of a found element taking into account the array serial. In case of failure it returns -1.
Документация по MQL5: Операции с массивами / ArrayMaximum
Документация по MQL5: Операции с массивами / ArrayMaximum
  • www.mql5.com
ArrayMaximum - Операции с массивами - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Vitaly Muzichenko #:

It's in the documentation:

https://www.mql5.com/ru/docs/array/arraymaximum

Thanks a lot.
 
Vitaly Muzichenko #:

It's in the documentation:

https://www.mql5.com/ru/docs/array/arraymaximum

Hi Vitaly!
       Could you help me, I have seen this code and I was trying it but I would need your help for the magenta color line together with the current one,
Thank you very much.

Files:
 
Spanish Chewbacca # :

Привет Виталий!
Не могли бы вы мне помочь, я видел этот код и пробовал его, но мне понадобится ваша помощь для линии пурпурного цвета вместе с текущей,
Большое тебе спасибо.

How do you know where the next peak is?

Try ZigZag

 
Vitaly Muzichenko #: Try ZigZag

Or just keep going up hill untill you get to the top.

      INDEX    iExtreme = iBeg++;   Datatype extreme  = arr[iExtreme], value;
      INDEX    iLimit   = MathMin(iEnd, iExtreme + size);
      for(; iBeg < iLimit; ++iBeg){
         value = arr[iBeg];
         if(comp.is_before(extreme, value) ){
            iExtreme = iBeg;  extreme = value;
            iLimit   = MathMin(iEnd, iExtreme + size);
      }  }
 
Vitaly Muzichenko #:

¿Cómo sabes dónde está el próximo pico?

Prueba ZigZag

That's what I want to know, how can I get that pickaxe.

Thank you very much.

 
William Roeder #:

Or just keep going up hill untill you get to the top.

Hello William!
But I don't understand your code.
If I have, as in Vitaly's code, a maximum and/or minimum point ( TimeUp, max, TimeUp, min) now I would need to obtain another maximum and/or minimum point for the other vector or recoil, since the one obtained by Vitaly would be the impulse of a fractal and with INDEX (I don't know what it is) I see matrices but no High or Low.

<Text Not in English Deleted>

Would it be as I indicate?
Thank you very much.

Reason: