find timeframe?

 

Is there a way to find the timeframe selected on a chart?

I want to only execute code if the timeframe is on the 1 hr chart.

 
SanMiguel:

Is there a way to find the timeframe selected on a chart?

I want to only execute code if the timeframe is on the 1 hr chart.

Period()

Cheers