Can EA be programmed to trade on lower timeframe together with the information it gathered from higher timeframes ?

 
I want to know if EA programmed to trade on 5 mins. chart can use the information generated from 30mins. chart. I mean that a certain condition will be meet on the 30mins. chart before the EA can trade on the 5mins. chart. All in the same EA? so,if possible please describe or better still explain the right codes.
 
Yes, you need to look at the following: Timeseries access in particular iLow, iHigh,etc you can specify the time frame with these functions . . . if you are referring to Technical Indicators then I can't help, I don't use them.
 
What can you learn from one bar on a 30min chart that you can't learn from 6 bars on a 5min chart or 30 bars on a 1min chart? Why switch time frames?
 
Okay I see, but i think studying price with only bars has no difference in different time frames, but using both price bars and technical indicators there are lots of differences. so, what do you think MISTERDOG?
 

Misterdog: because it can be easier to program? Let's say you want the close of yesterday. Instead of having to calculate the amount of bars needed to get to that close, you can simple request the close of yesterday by using the PERIOD_D1 constant. ( https://docs.mql4.com/constants/timeframes )

 
burgie:

Misterdog: because it can be easier to program? Let's say you want the close of yesterday. Instead of having to calculate the amount of bars needed to get to that close, you can simple request the close of yesterday by using the PERIOD_D1 constant. ( https://docs.mql4.com/constants/timeframes )

Yes, good point. This is an easy way to do it.
 
Even when it comes to technical indicators, most use Periods. For example: you can put a 30 minute 10 period moving average on a five minute chart. 30 divided by 5 = 6. so, on the five minute chart, 10 periods times 6 = 60 periods. A 60 period moving average of five minute chart will look the same as a 10 period moving average on a 30 minute chart. The advantage is that you can represent both time frames on one chart.
 
MisterDog:
Even when it comes to technical indicators, most use Periods. For example: you can put a 30 minute 10 period moving average on a five minute chart. 30 divided by 5 = 6. so, on the five minute chart, 10 periods times 6 = 60 periods. A 60 period moving average of five minute chart will look the same as a 10 period moving average on a 30 minute chart. The advantage is that you can represent both time frames on one chart.
Not everyone uses Technical Indicators ;-) I don't, my EA can look at data on two timeframes and has the capability to look at more than two . . .
 
MisterDog:
Even when it comes to technical indicators, most use Periods. For example: you can put a 30 minute 10 period moving average on a five minute chart. 30 divided by 5 = 6. so, on the five minute chart, 10 periods times 6 = 60 periods. A 60 period moving average of five minute chart will look the same as a 10 period moving average on a 30 minute chart. The advantage is that you can represent both time frames on one chart.

Not true at all, the the iMA(Open,H1,2) is not the same as iMA(Open,M1,120) at least certainly not for 59minutes in one hour. (Beside that, there is a performance difference)

Looking at higher timeframes gives you the 'advantage' of filtered data. Of course you loose informations trough that filtration.

 
RaptorUK:
Not everyone uses Technical Indicators ;-) I don't, my EA can look at data on two timeframes and has the capability to look at more than two . . .
A bar is a technical indicator in my opinion. It's still data averaged over a timeframe, but just presented in a different format. I presume you do not trade ticks?
 
zzuegg:

Not true at all, the the iMA(Open,H1,2) is not the same as iMA(Open,M1,120) at least certainly not for 59minutes in one hour. (Beside that, there is a performance difference)

Looking at higher timeframes gives you the 'advantage' of filtered data. Of course you loose informations trough that filtration.

Ok, I will hand it to you. After some checking, I would say they are close by eye but of course were talking about programming here so I agree -- they are significantly different. The very few bars (H1,2) contributes to that difference. It's interesting to note that a M30,4 looks much more similar to a M1,120 then a H1,2 compared to M1,120.
Reason: