Can EA access a different timeframe than the one used by associated chart?

I’m building a basic EA. I would like to enter a long position on the high of the last x hourly candle.

Is the timeframe of the chart overruling the timeframe set on the EA? If in the code I calculate the high on the hourly candle (double HighEntry = High[iHighest(“EURUSD”,60,MODE_HIGH,48,1)]), but then I change the chart from hourly to any other timeframe, then the high is not calculated anymore on the hourly candles but on the timeframe that I selected for the chart.

I thought that by specifying the timeframe in the code, the EA would have calculated the high on the coded timeframe, even if the chart (in which the EA is running) is running on a different timeframe.


EA can calculate/access/watch any time-frameyou want, as your code can chose any time-frame to base its calculations. so it can be totally independent of the timeframe it was activated on.(and time frame changes may or may not affect your EA behaviour)