Fractals - page 3

 

ChannelType is a size of fractal (1 - 3 bars, 2-5bars,3-7 bars and so on)

For correct work of MTF version you should have FractalChannel_v4 (it's correct name) in indicators folder also.

This indicator have not nothing common with TD lines, levels...

 

OK, I needed some time to check the MTF fractal channel indicator out on another PC, because on my usual PC it basically bugs...

Now I've checked it on another PC, and in basic mode the indicator works. But when I try to fiddle around with different settings, using time frame "1" gives strange results, and when I try other settings, I end up crashing on that PC as well...

Also, as far as I can see, the default setting is just the same as for the basic channel indicator. What setting am I supposed to use to get, say, the fractals for every 10 candles?

Anyway, even though it's a great indicator, it is not what I'm really looking for, as far as the task at hand goes.

However, I suddenly kinda saw the light and figured out a simplistic way to get what I'm looking for, although it's not yet how the indicator should really be.

What I did is take the following code:

int start()

{

int D1=1440, H4=240, H1=60, M15=15,B;

double P;[/CODE]

and change it into (for example):

int start()

{

int D1=480, H4=240, H1=120, M15=60,B;

double P;

= basic fractal multiplied by 2, 4 and 8, which gives fractals for every 5, 10, 20, 40 bars

or

[CODE]int start()

{

int D1=252, H4=156, H1=96, M15=60,B;

double P;

= basic fractal as put in a fibonacci sequence, which gives fractals for every 5, 8, 13, 21 bars

See the attached pictures for what this looks like.

But although this little modification is nice to do some backtesting, it only gives the sequences I'm looking for on the 1hr chart (giving the same fractals when viewing a different time frame).

While I could make a seperate version for every time frame, that is definitely not an ideal solution. And I'm not sure yet what the ideal setting should be, as I have to do a lot more backtesting.

So can someone figure out how to program things so that the sequences of the above examples are automatically applied when you change timeframes? (as with the present versions, it's the same fractals that are seen in all timeframes).

It would be even more ideal if it could be possible to freely set the number of bars for every color in the "input" menu, but that is not the first priority.

See the attached modified indicators, for 1hr charts.

Thanks for all help

 

Some article about fractals (attached).

Besides I found the following:

Fractal Adaptive Moving Averages

by John F. Ehlers

We all want to eliminate bad whipsaw trades. Here's a weapon you can add to your arsenal of technical indicators for just that purpose.

The objective of using filters is to separate the desirable signals from the undesirable ones. The practical application of moving averages often involves a tradeoff between the amount of smoothness required and the amount of lag that can be tolerated. Moving averages have this problem because the price data is not stationary and may have different bandwidths over different time intervals.

Various momentum-adaptive filtering techniques have been developed to take advantage of the nonstationary structure of prices. Adaptive filters have also been developed based on price statistics and the cyclic content of the price data. In this article, I will describe a different class of filters that monitors a measure of temporal nonstationarity and alters their bandwidth in response to this measure.

ARE MARKETS FRACTAL?

There is no argument that market prices are fractal. Fractal shapes are self-similar -- that is, a particular fractal has the same roughness and sparseness no matter how closely you view them. For example, if you remove the labels from a five-minute chart, a daily chart, and a weekly chart, you would have difficulty telling them apart. This is the characteristic that makes them fractal. The fractal dimension that describes the sparseness at all magnification levels defines the self-similarity.

...Continued in the October issue of Technical Analysis of STOCKS & COMMODITIES (2005)

And the following:

In "FRAMA - Fractal Adaptive Moving Average" article John Ehlers

presents a new method of adaptive smoothing based on assumption that

market prices are fractal. Coding Fractal Adaptive Moving Average (FRAMA)

is relatively straightforward in AmiBroker Formula Language (AFL).

Thanks to its powerful array processing functions FRAMA can be implemented

in AmiBroker without any loops making it extremely fast. Ready-to-use

code is presented in Listing 1. For comparison purposes the code also

plots standard exponential moving average of the same length.

*/

// FRAMA - Fractal Adaptive Moving Average

Price = (H+L)/2;

N = Param( "N", 16, 2, 40, 2 ); // must be even

N3 = ( HHV( High, N ) - LLV( Low, N ) ) / N;

HH = HHV( High, N / 2 ) ;

LL = LLV( Low, N / 2 );

N1 = ( HH - LL ) / ( N / 2 );

HH = HHV( Ref( High, - N/2 ), N/2 );

LL = LLV( Ref( Low, - N/2 ), N/ 2 );

N2 = ( HH - LL ) / ( N / 2 );

Dimen = IIf( N1 > 0 AND N2 > 0 AND N3 > 0, ( log( N1+N2) - log( N3 ) )/log( 2 ), Null );

alpha = exp( -4.6 * (Dimen -1 ) );

alpha = Min( Max( alpha, 0.01 ), 1 ); // bound to 0.01...1 range

Frama = AMA( Price, alpha );

Plot( Frama, "FRAMA("+N+")", colorRed, styleThick );

Plot( EMA( C, N ) , "EMA("+N+")", colorBlue );

Plot( C, "Close", colorBlack, styleCandle );
Files:
fractals.pdf  483 kb
 

isnt the problem with fractals the fact that they dont draw soon enough. like if you base your fractal on 5 bar high you will be 3 bars into the move before the fractal is drawn?, or if they're based completly on past movements then they would have to be dynamic to show what theyre meant to show. so are they actually worth using?

 
trevman:
isnt the problem with fractals the fact that they dont draw soon enough. like if you base your fractal on 5 bar high you will be 3 bars into the move before the fractal is drawn?, or if they're based completly on past movements then they would have to be dynamic to show what theyre meant to show. so are they actually worth using?

I used those fractals in my real account many years ago and now i am trying to re-mind myself about it because i almost forgot this subject and because there are a lot of new indicators were created. Especially indicators from Igorad.

If I have a time so I will create some trading systems based on it.

But it is necessary for me to read some ebooks/articles first.

 

Found some article (two the same files in doc and in pdf format) about how to trade fractals.

In Russian, sorry.

Files:
1.gif  76 kb
2.jpg  279 kb
3.jpg  110 kb
4.jpg  80 kb
 

does the indicator Ind-Fractals-1 redraw any of its fractals and how long does it take to draw the brown fractals. these seem to show the main trend so taking trades in that direction would be good, but it would need to be established early on.

 
trevman:
isnt the problem with fractals the fact that they dont draw soon enough. like if you base your fractal on 5 bar high you will be 3 bars into the move before the fractal is drawn?, or if they're based completly on past movements then they would have to be dynamic to show what theyre meant to show. so are they actually worth using?

Unless you use them as S&R levels. I find the multitime fractles really useful to see where SR levels are on the higher TF.

 
 

Fractal indicator

hi!

i was wondering if anyone could help me to modify the standard fractal indicator below. the fractal is made using 5 bars. for an up fractal 2 bars lower on either side. and for a down fractal 2 bars higher in either side.

could someone please add a variable where the number of bars it takes to make a fractal can be changed. for example 3 bars were you have a high bar and 1 bar either side to make the fractal instead of 2.

thanks in advance

Files:
fractal.mq4  6 kb