Download MetaTrader 5

iFractals explanation

To add comments, please log in or register
Tom Maryland
77
Tom Maryland  

Hi,I dont understand what the iFractals function does...Does it tell you if lets say High[at certain point] is a fractal?

And also, lets say I've found the highest price bar using this function:

double GetMaxPrice()
{
   dHigh = 0;
   double dHPrice;
  
  for(int i=1; i<=36; i++)
  {
    dHPrice = iHigh(Symbol(),0,i);
    if(dHPrice>dHigh)
    {
      dHigh = dHPrice;
    }
  }    
  return(dHigh); 

How can I check if that price bar is also a fractal? Thank you

Keith Watford
Moderator
10064
Keith Watford  
The fractal up or fractal down buffer will have a value. If there is no fractal on that bar, the buffer will be zero value
Simon Gniadkowski
Moderator
18018
Simon Gniadkowski  
Redael777:

Hi,I dont understand what the iFractals function does...Does it tell you if lets say High[at certain point] is a fractal?

And also, lets say I've found the highest price bar using this function:

How can I check if that price bar is also a fractal? Thank you

You could simply use iHighest() . . .

double GetMaxPrice()
   {
   return( iHigh( NULL, 0, iHighest(NULL, 0, MODE_HIGH, 36, 1) ) );
   }

to check the fractal use iHighest() again to get the bar number and check the fractal value of that bar.

Tjipke de Vries
6339
Tjipke de Vries  
RaptorUK:

You could simply use iHighest() . . .

to check the fractal use iHighest() again to get the bar number and check the fractal value of that bar.


no you can't use that method it can happen

you have more then one fractal in the period you search with iHighest

Keith Watford
Moderator
10064
Keith Watford  
deVries:


no you can't use that method it can happen

you have more then one fractal in the period you search with iHighest


The OP didn't ask whether it would be the last fractal, just that it was also a fractal.
Simon Gniadkowski
Moderator
18018
Simon Gniadkowski  
deVries:


no you can't use that method it can happen

you have more then one fractal in the period you search with iHighest

That wasn't the question though . . .

How can I check if that price bar is also a fractal? Thank you

Tjipke de Vries
6339
Tjipke de Vries  
RaptorUK:

That wasn't the question though . . .


Redael777:

Hi,I dont understand what the iFractals function does...Does it tell you if lets say High[at certain point] is a fractal?

And also, lets say I've found the highest price bar using this function:

How can I check if that price bar is also a fractal? Thank you

https://www.mql5.com/en/code/7982

Fractal Technical Indicator it is a series of at least five successive bars, with the highest HIGH in the middle, and two lower HIGHs on both sides. The reversing set is a series of at least five successive bars, with the lowest LOW in the middle, and two higher LOWs on both sides, which correlates to the sell fractal. The fractals are have High and Low values and are indicated with the up and down arrows.

This is the explanation to understand what the iFractals function does...

So its only fractal if it is atleast bar 2 and if your highest is one of the two latest bars of the period you search then also it can be it is not a fractal ....

iHighest or iFractal .... It is something different

To add comments, please log in or register