Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 19:37:23 +0000



simpler fractal indicator requested if possible...

View Count: 3813

[2013-06-04 15:35:28]
User53765 - Posts: 66
Hi Sierra Support,

Im looking at the list of technical indicators and only see the Bill Williams fractal indicator. What im observing is a standard fractal calculation vs Bill Williams fractal indicator may be different as many fractal points are getting missed.

Can you please let me know if you guys can add a standard Fractal indicator based on a simple 5 bar formation without any other adjustments.

Thanks in advance, AD.
[2013-06-04 22:09:58]
Sierra Chart Engineering - Posts: 104368
Do you have the formula for this? If it is simple, we should be able to add it.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-06-04 23:51:34]
User53765 - Posts: 66
No I do not have the formula required to input for this indicator, sorry. Nor am I aware of how to go about getting it.

It maybe possible to copy and paste a formula used on another platform I can double check, but I don`t know if this would help.

Please let me know. Thanks.
[2013-06-06 00:12:16]
Sierra Chart Engineering - Posts: 104368
Go ahead and post what you have. But we cannot make any promises about if we could add it or not. We are quite busy with other things now.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-06-06 00:50:40]
User53765 - Posts: 66
Im posting a code from another platform. Hopefully this helps. If not I don`t think there is anything more I can do. Kind Regards,AD.

#property link "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- input parameters

//---- buffers
double ExtUpFractalsBuffer[];
double ExtDownFractalsBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicator buffers mapping
SetIndexBuffer(0,ExtUpFractalsBuffer);
SetIndexBuffer(1,ExtDownFractalsBuffer);
//---- drawing settings
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,119);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,119);
//----
SetIndexEmptyValue(0,0.0);
SetIndexEmptyValue(1,0.0);
//---- name for DataWindow
SetIndexLabel(0,"Fractal Up");
SetIndexLabel(1,"Fractal Down");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here

//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i,nCountedBars;
bool bFound;
double dCurrent;
nCountedBars=IndicatorCounted();
//---- last counted bar will be recounted
if(nCountedBars<=2)
i=Bars-nCountedBars-3;
if(nCountedBars>2)
{
nCountedBars--;
i=Bars-nCountedBars-1;
}
//----Up and Down Fractals
while(i>=2)
{
//----Fractals up
bFound=false;
dCurrent=High;
if(dCurrent>High[i+1] && dCurrent>High[i+2] && dCurrent>High[i-1] && dCurrent>High[i-2])
{
bFound=true;
ExtUpFractalsBuffer=dCurrent;
}
//----6 bars Fractal
if(!bFound && (Bars-i-1)>=3)
{
if(dCurrent==High[i+1] && dCurrent>High[i+2] && dCurrent>High[i+3] &&
dCurrent>High[i-1] && dCurrent>High[i-2])
{
bFound=true;
ExtUpFractalsBuffer=dCurrent;
}
}
//----7 bars Fractal
if(!bFound && (Bars-i-1)>=4)
{
if(dCurrent>=High[i+1] && dCurrent==High[i+2] && dCurrent>High[i+3] && dCurrent>High[i+4] &&
dCurrent>High[i-1] && dCurrent>High[i-2])
{
bFound=true;
ExtUpFractalsBuffer=dCurrent;
}
}
//----8 bars Fractal
if(!bFound && (Bars-i-1)>=5)
{
if(dCurrent>=High[i+1] && dCurrent==High[i+2] && dCurrent==High[i+3] && dCurrent>High[i+4] && dCurrent>High[i+5] &&
dCurrent>High[i-1] && dCurrent>High[i-2])
{
bFound=true;
ExtUpFractalsBuffer=dCurrent;
}
}
//----9 bars Fractal
if(!bFound && (Bars-i-1)>=6)
{
if(dCurrent>=High[i+1] && dCurrent==High[i+2] && dCurrent>=High[i+3] && dCurrent==High[i+4] && dCurrent>High[i+5] &&
dCurrent>High[i+6] && dCurrent>High[i-1] && dCurrent>High[i-2])
{
bFound=true;
ExtUpFractalsBuffer=dCurrent;
}
}
//----Fractals down
bFound=false;
dCurrent=Low;
if(dCurrent<Low[i+1] && dCurrent<Low[i+2] && dCurrent<Low[i-1] && dCurrent<Low[i-2])
{
bFound=true;
ExtDownFractalsBuffer=dCurrent;
}
//----6 bars Fractal
if(!bFound && (Bars-i-1)>=3)
{
if(dCurrent==Low[i+1] && dCurrent<Low[i+2] && dCurrent<Low[i+3] &&
dCurrent<Low[i-1] && dCurrent<Low[i-2])
{
bFound=true;
ExtDownFractalsBuffer=dCurrent;
}
}
//----7 bars Fractal
if(!bFound && (Bars-i-1)>=4)
{
if(dCurrent<=Low[i+1] && dCurrent==Low[i+2] && dCurrent<Low[i+3] && dCurrent<Low[i+4] &&
dCurrent<Low[i-1] && dCurrent<Low[i-2])
{
bFound=true;
ExtDownFractalsBuffer=dCurrent;
}
}
//----8 bars Fractal
if(!bFound && (Bars-i-1)>=5)
{
if(dCurrent<=Low[i+1] && dCurrent==Low[i+2] && dCurrent==Low[i+3] && dCurrent<Low[i+4] && dCurrent<Low[i+5] &&
dCurrent<Low[i-1] && dCurrent<Low[i-2])
{
bFound=true;
ExtDownFractalsBuffer=dCurrent;
}
}
//----9 bars Fractal
if(!bFound && (Bars-i-1)>=6)
{
if(dCurrent<=Low[i+1] && dCurrent==Low[i+2] && dCurrent<=Low[i+3] && dCurrent==Low[i+4] && dCurrent<Low[i+5] &&
dCurrent<Low[i+6] && dCurrent<Low[i-1] && dCurrent<Low[i-2])
{
bFound=true;
ExtDownFractalsBuffer=dCurrent;
}
}
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+

[2013-06-06 09:19:28]
tobi - Posts: 351
User53765,

have a look at Sierra Chart's study called Swing High And Low.
Maybe this is what you're looking for.
[2013-06-06 14:55:25]
User53765 - Posts: 66
Thanks Tobi fx,

Swing high low does have the same effect that I was looking for.

All the best, AD.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account