Download MetaTrader 5
To add comments, please log in or register
What is the best place to find a programmer? Freelance service!
puiucristian
24
puiucristian 2016.01.20 14:34 

Greetings,

 

 I need some help from you guys.

 

Is it possible to use iFractals with different period than the current one?

I use this to get latest low / high line , but it only worlk is the period used on chart is the same as the parameter.

 

Can I get the latest fractals from other timelines with iFractal?

 

Thanks.

 

int getFractal(int dir)

{
   for(int i=0;i<2000;i++)
   {
      double val = iFractals(Symbol(),PERIOD_M15,dir,i);
      if(val != 0)
      {
         if(dir == 1) f_h = val;
         else if(dir == 2) f_l = val;
         return;
      }
   }
}
Stuart Browne
5781
Stuart Browne 2016.01.20 23:37  
puiucristian:

int getFractal(int dir)

{
   for(int i=0;i<2000;i++)
   {
      double val = iFractals(Symbol(),PERIOD_M15,dir,i);
      if(val != 0)
      {
         if(dir == 1) f_h = val;
         else if(dir == 2) f_l = val;
         return;
      }
   }
}
Change the highlighted part of your code to whatever timeframe you want
/
To add comments, please log in or register