How to find in MQL the 2 max & 2 min prices of the recent 300 candles & draw the line ?

 

What MQL command can I search last two min. and two max. prices of the recent 300 candles,

and how to draw lines by those min. prices and max. prices - connecting the two biggest min. (the first red line) and the two largest max. prices (the second green line) of the recent 300 candles ?



 

Nobody knows?

 
puncher wrote >>

Nobody knows?

Check this: 'Highest and lowest value of indicator'

 

Hi


Thanks for the reply. There is an example code:


double num_array[15]={4,1,6,3,9,4,1,6,3,9,4,1,6,3,9};
int    maxValueIdx=ArrayMaximum(num_array);
Print("Max value = ", num_array[maxValueIdx]);


Do you know how to auto-resize the Array of recent 300 bars the LOW value in LOOP ?

Rgds,