Higher TimeFrame Trend Indicator:
Author: Desmond ORegan
I don't know if this thread is still active but just looked at the code for the trend indicator and you seem to be working out the timeframe for the current chart...
double MA_1 = iMA(Symbol(),0,(Upper_Timeframe_MA_1*MA_Factor),0,MODE_EMA,PRICE_CLOSE,i);
the 0 in the iMA function takes the current chart timeframe, unless I have got that all wrong... which is a real possibility lol