candle ID in lower TF
-
hi
how can i convert candle id in higher timeframe to lower timeframe?
for example
in 1H my candle id is 10 so i have ID10
ID10 also has a time
i want to know what is the ID number in 1min chart
it can be ID600 in 1min
but how can i achieve this?
i have one solution but its not efficient
i get the time of 1H Candle
then in 1min chart i loop through every candle and check if time of each candle are equal to Time of 1H Candle
if times are the same so my candle Id in 1min would be my counter(in the loop)
but its not sufficient and takes 1 to to second to calculate this and my EA would be Laggy in the chart
any idea how can i achieve this? -
You select time in the block but, 1h opens in the hour, 15m opens every 15min, so not sure how much use this would be.
-
@jstap
time value is the same
so if you have Time of candleID10 in 1H you can go to 1min chart and look for the the same Time and see what is the CandleID in 1min
but dont know how to do this in FXDreema without loop -
You don't need the ID if you have the time.
-
@jstap how can i convert candleID in 1H to candleID in 1min?
-
Don't know but time is always the same.
-
Record the datetime value of hourly candle:
datetime timevar = iTime(NULL, PERIOD_H1, 123);Get the candle ID from that time, in selected timeframe:
int idvar = iBarShift(NULL, PERIOD_M1, timevar);https://www.mql5.com/en/docs/series/itime
https://www.mql5.com/en/docs/series/ibarshift -
@roar thx for response
how you do this in fxdreema? -
Like this, for example

-
@roar thx let me try it