Download MetaTrader 5

How Can I do to indicate a more big timefrime in automatic way?

To add comments, please log in or register
trader201
410
trader201  
Hello. I want to write PERIOD_CURRENT in a timeframe of an indicator. And I want a more big period in other indicator, in a way that make the change automatic, and not manual.

Somebody know what I need to write for do this? (maybe a word that mean something like next timefrime or something like this?)


Thank you in advance

trader201

whroeder1
15577
whroeder1  
trader201: something like next timefrime
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Not compiled, not tested
ENUM_TIMEFRAMES GetHigherTF(ENUM_TIMEFRAMES cur = PERIOD_CURRENT){
   static ENUM_TIMEFRAMES  tfPeriods[]={  PERIOD_M1,  PERIOD_M5, PERIOD_M15, 
                                          PERIOD_M30, PERIOD_H1, PERIOD_H4, 
                                          PERIOD_D1,  PERIOD_W1, PERIOD_MN1   };

   if(cur == PERIOD_CURRENT)  cur = _Period;
   for(int i = 0, tfPeriods[i] != cur; ++cur){}
   return tfPeriod[i+1];
}
Not compiled, not tested
To add comments, please log in or register