Help: Last Fractal Level Lines

 

Hello

im trying to draw lines on a 15 Min chart at the level of the last, most recent, Up and Down fractal (using iFractals).

I have enclosed a screen shot (Eur/USD) of what i mean and also the code that i have been using until now (fractallines.mq4).

Suffice to say the code does not work; no lines are drawn.


Could someone help me along please ? Thank you in advance :)

.UpDownFractal

Files:
 
Your code
         for (i=1; i<10; i++) 
         {
          double fc1 = iFractals(Symbol(),15,MODE_LOWER,i);
          double fc2 = iFractals(Symbol(),15,MODE_UPPER,i);
         }
Equivalent
          double fc1 = iFractals(Symbol(),15,MODE_LOWER,9);
          double fc2 = iFractals(Symbol(),15,MODE_UPPER,9);

Do you know what iFractals normally returns?

Did you print your values so you find out why?