Is there a way to get the time information of the top and bottom of a single candle?

 
As I explained in the picture below.

For example, this candle that appears on the H1 chart has a high and a low. On lower time charts, for example, if High then Low occurs on "Tick" charts, I will do another calculation. If it's low and then high, I'll do another calculation.  There is a time string in "OnCalculate", but it only shows what hour that candle is.

I'm thinking how can I learn this but I couldn't find a way.


https://imgur.com/a/uTjVFiJ


imgur.com
  • imgur.com
Imgur: The magic of the Internet
 
guga19:As I explained in the picture below. For example, this candle that appears on the H1 chart has a high and a low. On lower time charts, for example, if High then Low occurs on "Tick" charts, I will do another calculation. If it's low and then high, I'll do another calculation.  There is a time string in "OnCalculate", but it only shows what hour that candle is. I'm thinking how can I learn this but I couldn't find a way.

Yes, exactly as you have described it — your code will have to analyse the M1 bars for that time period (which will give you a one minute resolution) or it will have to analyse the tick data (which will give you millisecond resolution). You can combine both methods for a faster result, where you only analyse the tick data for minute at which the excursions occurred.

 
Fernando Carreiro #:

Yes, exactly as you have described it — your code will have to analyse the M1 bars for that time period (which will give you a one minute resolution) or it will have to analyse the tick data (which will give you millisecond resolution). You can combine both methods for a faster result, where you only analyse the tick data for minute at which the excursions occurred.

Thanks. I think  got it. I guess I could use "CopyTicks" directly instead of using M1.

I'm actually trying to do a zigzag right. The zigzag, which seems to be drawn correctly on H1, looks wrong on the lower charts. Because there is another high crossing the high between the combined highs and lows...For example, we should not measure the fibo retracement between those two points....

Reason: