Download MetaTrader 5

How to use Fractals indicator to create EA? Seems no buffer value on Fractals indicator!

To add comments, please log in or register
Did you like the article? Share it with your friends!
Sherif Hasan
7290
Sherif Hasan 2015.05.30 08:07 

???

Support me?

Keith Watford
Moderator
9619
Keith Watford 2015.05.30 09:40  
The Bill Williams fractal indicator has 4 buffers in the data window, you need to use buffer 2 and 3
Sherif Hasan
7290
Sherif Hasan 2015.05.30 20:44  
GumRai:
The Bill Williams fractal indicator has 4 buffers in the data window, you need to use buffer 2 and 3
I tried the Williams fractal indicator, where i dont get buffer values?
Keith Watford
Moderator
9619
Keith Watford 2015.05.31 00:27  

Sorry, I made an error, the Bill Williams fractal has 2 buffers shown in the date window

Fractal Up and Fractal Down.

Simple code

   double val;
   int x;
   for(x=1;x<100;x++)
     {
     val=iFractals(Symbol(),0,MODE_UPPER,x);
     if(val>0)
       break;
     }
   Print("Shift=",x," value=",DoubleToStr(val,Digits));

Obviously, use MODE_LOWER for the down fractal 

Sherif Hasan
7290
Sherif Hasan 2015.05.31 06:57  
GumRai:

Sorry, I made an error, the Bill Williams fractal has 2 buffers shown in the date window

Fractal Up and Fractal Down.

Simple code

Obviously, use MODE_LOWER for the down fractal 

 

Hi GumRaj,

Thanks for your support. but i try  to show fractal value on screen, but no results?

    string temp = "Some Text\n";
    temp = temp + "------------------------------------------------\n"
    + "Some text " + DoubleToStr(iFractals(NULL, NULL,MODE_UPPER,1), Digits) + "\n"
    + "Some text " + DoubleToStr(iFractals(NULL, NULL,MODE_LOWER,1), Digits) + "\n"
    + "Some text " + DoubleToStr(0, 5) + "\n"
    + "Some text " + DoubleToStr(0, 5) + "\n"
    + "------------------------------------------------\n";
    Comment(temp);
Keith Watford
Moderator
9619
Keith Watford 2015.05.31 08:38  
iFractals(NULL, NULL,MODE_UPPER,1)
As fractals require 2 closed bars before drawing the fractal, bar 1 will never show a value
Chistabo
158
Chistabo 2015.05.31 09:00  
sheriffonline:

Hi GumRaj,

Thanks for your support. but i try  to show fractal value on screen, but no results?

Hi!

Checking (Meta Editor -> Help ->) MQL4 Reference, and Search(ing) for iFractals, then comparing your code with example in the 'book', you should find the answer. (think NULL != 0). Try this.

This is the first thing I do when solving coding issues.

Best regards,

Simon

S love nia

Sherif Hasan
7290
Sherif Hasan 2015.05.31 14:05  
GumRai:
As fractals require 2 closed bars before drawing the fractal, bar 1 will never show a value
Thanks. got it to works.
To add comments, please log in or register