Login Page

Support Board

  #1  
Old 02-23-2009, 03:47 PM
User Account
 
Join Date: Feb 2009
Posts: 20
Default Bill Williams - Fractal Signal

In this study, what is the difference between the standard input of 10 under Maximum Length of Fractal Signal, and changing this number to 5?
Bill Williams formula is 2n2. How does this setting relate to price bars?
After studying price patterns and changing the numbers, I do not see a consistent pattern? Please Explain.

Does this indicator only count bars to the left of the signal bar?
Attached Thumbnails
Click image for larger version

Name:	00001 2-23-2009 10.43.39 AM.jpg
Views:	220
Size:	81.0 KB
ID:	2512   Click image for larger version

Name:	00002 2-23-2009 10.43.46 AM.jpg
Views:	181
Size:	73.8 KB
ID:	2513   Click image for larger version

Name:	00008 2-23-2009 10.46.52 AM.jpg
Views:	286
Size:	9.7 KB
ID:	2515   Click image for larger version

Name:	00009 2-23-2009 10.48.41 AM.jpg
Views:	266
Size:	10.3 KB
ID:	2516   Click image for larger version

Name:	00013 2-23-2009 10.50.11 AM.jpg
Views:	220
Size:	10.7 KB
ID:	2517  

Click image for larger version

Name:	00012 2-23-2009 10.49.56 AM.jpg
Views:	197
Size:	10.5 KB
ID:	2518  

Last edited by eganology; 02-23-2009 at 03:50 PM.
  #2  
Old 02-23-2009, 08:43 PM
SC_SupportGroup's Avatar
Sierra Chart Support - Engineering Level
 
Join Date: Jan 2000
Posts: 61,170
Default Re: Bill Williams - Fractal Signal

Thank you, we will look this over and we may need to make some changes to the study. We may just take that input out. My understanding is that it indicates how many bars to look at to the left and right of the bar being calculated to see if there is a pattern.
__________________
Cheers
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy.

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
  #3  
Old 02-23-2009, 09:11 PM
User Account
 
Join Date: Feb 2009
Posts: 20
Default Re: Bill Williams - Fractal Signal

This code works well for me.


//+------------------------------------------------------------------+
//| Ind-Fractals-1.mq4 |
//| Copyright 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red
#property indicator_color3 Blue
#property indicator_color4 Blue
#property indicator_color5 Lime
#property indicator_color6 Lime
#property indicator_color7 Sienna
#property indicator_color8 Sienna
//---- input parameters
extern bool Comm=true;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,217);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexEmptyValue(0,0.0);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,218);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexEmptyValue(1,0.0);
SetIndexStyle(2,DRAW_ARROW);
SetIndexArrow(2,217);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexEmptyValue(2,0.0);
SetIndexStyle(3,DRAW_ARROW);
SetIndexArrow(3,218);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexEmptyValue(3,0.0);
SetIndexStyle(4,DRAW_ARROW);
SetIndexArrow(4,217);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexEmptyValue(4,0.0);
SetIndexStyle(5,DRAW_ARROW);
SetIndexArrow(5,218);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexEmptyValue(5,0.0);
SetIndexStyle(6,DRAW_ARROW);
SetIndexArrow(6,217);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexEmptyValue(6,0.0);
SetIndexStyle(7,DRAW_ARROW);
SetIndexArrow(7,218);
SetIndexBuffer(7,ExtMapBuffer8);
SetIndexEmptyValue(7,0.0);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//------------------------------------------------------------------
bool Fractal (string F,int Per, int shift)
{
if (Period()>Per) return(-1);
Per=Per/Period()*2+MathCeil(Per/Period()/2);
if (shift<Per)return(-1);
if (shift>Bars-Per)return(-1);
for (int i=1;i<=Per;i++)
{
if (F=="U")
{
if (High[shift+i]>High[shift])return(-1);
if (High[shift-i]>=High[shift])return(-1);
}
if (F=="L")
{
if (Low[shift+i]<Low[shift])return(-1);
if (Low[shift-i]<=Low[shift])return(-1);
}
}
return(1);
}
//------------------------------------------------------------------
int start()
{
int D1=1440, H4=240, H1=60, M15=15,B;
double P;
// int counted_bars=IndicatorCounted();
B=Bars;
if (Period()==D1)P=15*Point;
if (Period()==H4)P=7*Point;
if (Period()==H1)P=4*Point;
if (Period()==30)P=3*Point;
if (Period()==M15)P=2*Point;
if (Period()==5)P=1*Point;
if (Period()==1)P=0.5*Point;
for (int shift=B;shift>0;shift--)
{
if (Fractal("U",M15,shift)==1) ExtMapBuffer1[shift]=High[shift]+P;
else ExtMapBuffer1[shift]=0;
if (Fractal("L",M15,shift)==1) ExtMapBuffer2[shift]=Low[shift]-P;
else ExtMapBuffer2[shift]=0;
if (Fractal("U",H1,shift)==1) ExtMapBuffer3[shift]=High[shift]+P;
else ExtMapBuffer3[shift]=0;
if (Fractal("L",H1,shift)==1) ExtMapBuffer4[shift]=Low[shift]-P;
else ExtMapBuffer4[shift]=0;
if (Fractal("U",H4,shift)==1) ExtMapBuffer5[shift]=High[shift]+P;
else ExtMapBuffer5[shift]=0;
if (Fractal("L",H4,shift)==1) ExtMapBuffer6[shift]=Low[shift]-P;
else ExtMapBuffer6[shift]=0;
if (Fractal("U",D1,shift)==1) ExtMapBuffer7[shift]=High[shift]+P;
else ExtMapBuffer7[shift]=0;
if (Fractal("L",D1,shift)==1) ExtMapBuffer8[shift]=Low[shift]-P;
else ExtMapBuffer8[shift]=0;
}
if (Comm) Comment(" D1 - brown\n H4 - green\n H1 - blue\nM15 - red ");
// ObjectCreate("T_D1",OBJ_TEXT,0,Time[30],Close[0]+10*P);
// ObjectSetText("T_D1","D1",10,"Times New Roman",indicator_color8);
// ObjectCreate("T_H4",OBJ_TEXT,0,Time[20],Close[0]+10*P);
// ObjectSetText("T_H4","H4",10,"Times New Roman",indicator_color6);
// ObjectCreate("T_H1",OBJ_TEXT,0,Time[10],Close[0]+10*P);
// ObjectSetText("T_H1","H1",10,"Times New Roman",indicator_color4);
// ObjectCreate("T_M15",OBJ_TEXT,0,Time[0],Close[0]+10*P);
// ObjectSetText("T_M15","M15",10,"Times New Roman",indicator_color2);
return(0);
}
//+------------------------------------------------------------------+
 

Thread Tools Search this Subtopic
Search this Subtopic:

Advanced Search



All times are GMT. The time now is 09:37 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.