# Using ProBackTest with IT Charts

#### rags2riches

##### Well-known member
Hi,

I am learning to trade with IG Index and I have stumbled across their ProBackTest module which could be useful.

Does anyone know how to create conditions for entering a trade that rely on multiple timeframes?

Eg. Only go long if price is above:
- the 5 min 50 period moving average
AND
- the 30 min 50 period moving average

Without this kind of timeframe filter, I can't accurately test out ideas.

Many thanks.

PS: I could put a 300 period moving average on the 5 min chart to mimic the 30 min 50 period MA, but I understand that it is not the same thing?

#### Owenda

##### Member
im also wanting to understand how to trigger trades based on different time frames. Have tried using the various time functions with a loop to no avail. Cant seem to find a decent explanation on how to use the various functions.

#### cube101

##### Member
300sma on a 5 mins would be the same as 50sma on the 30
50 periods of 30 mins (50x30)= 1500 /5 = 300 sma
if you want to make sure then... 300 periods of 5 mins (300x5)= 1500 which is = to (50x30)

#### sure822

##### Member
have the same problem here, how to use different time frames to make rules?

#### jon827

##### Member
You can use different time frames in Proscreener but you cant Back test your system using different time frames in Probacktest, annoying I know

Proscreener Code would be something like this

TIMEFRAME (5 mn)
Price5min = CLOSE
x5minMA50 = ExponentialAverage[50](CLOSE)

c1 = (Price5min > x5minMA50)

TIMEFRAME (30 mn)
Price30min = CLOSE
x30minMA50 = ExponentialAverage[50](CLOSE)

c2 = (Price30min > x30minMA50)

SCREENER[c1 AND c2]