iBarshift PERIOD_H4 + PERIOD_H1 does not work in MT4

 

Hi, I want iBarshift to continue calculations for Two more hours thus making it 6 hours before other function. It can be seen in code but since there is no PERIOD_H6 in iBarshift parameter I am trying to manually add PERIOD_H1 or 60 two times to add two more hours but they are not working..how do I do this...similarly for iOpen and iClose ..regards.

      int dshift = iBarShift(Symbol(), PERIOD_H4 , Time[pos], false);
      double stretch = iCustom(Symbol(), PERIOD_H4, "Stretch", StPeriod, 0, dshift+1);

     //below not working 

      int dshift = iBarShift(Symbol(), PERIOD_H4 + PERIOD_H1 + PERIOD_H1 , Time[pos], false);
      double stretch = iCustom(Symbol(), PERIOD_H4 + PERIOD_H1 + PERIOD_H1, "Stretch", StPeriod, 0, dshift+1);
 
  1. How To Ask Questions The Smart Way. 2004
              Don't rush to claim that you have found a bug.
    Questions Not To Ask
              My program doesn't work. I think system facility X is broken.

    It is almost always your code.

  2. PERIOD_H4 + PERIOD_H1 + PERIOD_H1
    This is babel. What period is 240+60+60=360? There is no such enumeration with that value.
 
William Roeder:
  1. How To Ask Questions The Smart Way. 2004
              Don't rush to claim that you have found a bug.
    Questions Not To Ask
              My program doesn't work. I think system facility X is broken.

    It is almost always your code.

  2. This is babel. What period is 240+60+60=360? There is no such enumeration with that value.

I know this. I want to change ENUM value( standard is PERIOD_H4) manually and add two more hours to it so that I can calculate values for two more hours and make it H6. Is there any way to change ENUM  TIMEFRAME? thanks.

 

What part of “There is no such enumeration with that value” was unclear? MT4 does not have an H6.

You have to find/make an offline chart generator to create an H6 chart.