Composite Fractal Behavior and its aplications - page 29

To add comments, please log in or register
Mladen Rakic
139662
Mladen Rakic  
fabiogeraci:
Hello I have tried to load the latest version and it appears not to work

Which latest version are you referring to?

Latest versions of the cfb itself were posted here :

And they are working OK

On the other hand, if you are trying to use dynamic zones version, you have to have dynamiczones.dll in the libraries folder and you have to enable dll imports in the indicators properties - or else, it will not work. The dll you can download from here : https://www.mql5.com/en/forum/179876

Fabio Geraci
372
Fabio Geraci  
mladen:

Which latest version are you referring to?

Latest versions of the cfb itself were posted here :

And they are working OK

On the other hand, if you are trying to use dynamic zones version, you have to have dynamiczones.dll in the libraries folder and you have to enable dll imports in the indicators properties - or else, it will not work. The dll you can download from here : https://www.mql5.com/en/forum/179876

Thank you
myname
3231
myname  
fabiogeraci:
Thank you
Which one were you using?
Sergey Golubev
Moderator
110880
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Composite Fractal Behavior and its aplications

Mladen Rakic, 2014.03.23 22:24

In describing the cfb I am going to cheat : since it was invented by Jurik, here is what he is saying about it :

What is the Theory Behind CFB ?
CFB tells you how long the market has been in a quality trend. This value can be used to adjust the period length of other indicators, especially stochastic bands.

In order to quantify the overall duration of a market's trend, we replaced classical cycle analysis methods (FFT, MEM, MESA) with a form of analysis that works even when no cycles exist. We accomplished this by examining a time series for specific fractal patterns of any size. We then gather all the patterns found and combine them into one overall index, CFB (Composite Fractal Behavior) Index.

For good reason, CFB does not analyze time series data for dominant cycles. Classical cycle analysis examines data points (e.g. prices) and estimates the average presence of a cycle in the window. Now suppose a cycle with a period length of 9 days was strong for 50 days and then disappeared for the next 14 days. Because the cycle was present for 50 out of the last (50+14=64) days, the average presence of that cycle would be measured as "strong" even though it does not exist anymore!
Does CFB find the Dominant Cycle ?
No! Consider the following discussion about the MYTH of exploiting dominant cycles.

It is true that the market does have predictable cycles due to its "structural" or physical nature. For example, quarterly earning cycles, triple witching cycles, Federal Reserve meetings, weekly cycles, political election year cycles, the annual end-of-year stock dumping cycle, sunspot cycles, and the slow Kitchin (3-5 years), Juglar (7-11 years), Kuznet (15-25 years) and Kondratieff (45-60 years) cycles. They are very predictable and the markets readily discount their presence as far ahead in time as is reasonable. So there's not much left with regard to those cycles for you to exploit.

What traders see as cycles on an hourly chart, for example, is a different matter. The big, obvious cycles you see on price charts are actually the result of a combination of many weak cyclic forces that sometimes line up in phase to produce APPARENT dominant cycles that suggest the presence of a strong structural cycle that, in fact, does not exist. The slightest shifting in phase of any one component (due to crowd psychology, unscheduled events, etc.) will significantly alter the structure of the apparent dominant wave. This may drive the cycle into a "null" or random period, then reappear, completely out of phase. Now you see it ... and now you don't.

The transitory nature of these apparent dominant cycles makes their automated detection difficult and forecast unreliable. Sometimes cycle forecasting tools appear accurate and other times they are totally off mark. The reason is that tools designed to spot dominant cycles will announce whatever they find, even if they are only apparent (not structural) and transitory. For example, such tools would have no problem detecting cycles in the six charts below. But there is just one problem --- the slow cyclic price action in the six charts below is *impossible* to project into the future with any reasonable accuracy!

Why? Because we produced these six charts by simply adding consecutive random price changes. That's right!! These charts are nothing more than RANDOM WALKS. And by definition, they cannot be forecasted, no matter how impressive their apparent cyclic behavior may be!

The chart above does not "prove" market cycles are non-existent. Indeed, discretionary traders can learn to spot and use periodic price events, and take time to "understand" their causes, in order to verify whether the relevant triggers have actually occurred.

This demonstration does show, however, that cycle-finding tools like FFT, MESA and periodigrams, which have no understanding of market cause-effect relationships, can be easily fooled into seeing ghosts. In contrast, our CFB tool was designed to measure market trending action without assuming the existance of cycles. This makes CFB more reliable.

How would I use CFB's results ?
CFB produces a value proportional to a time series' trend duration. This value is in units of TIME, as measured in bars on a chart. Because CFB's output is in units of time and not price, CFB offers a unique window into a new dimension for representing signal behavior.

Investors have discovered many profitable ways to apply CFB:

* To auto-adjust the lookback of classical indicators, such as RSI

* To auto-adjust the lookback depth of breakout channels in trending markets

* To auto-adjust the minimum amount of retracement needed to reverse position

Making a profit in the market requires your finding a unique niche that very few other people are exploiting. CFB offers this unique perspective.

Do I specify a "period length" for CFB?
In CFB, period length determines how many bars (time slices) are examined for specific fractal patterns. Due to the complexity of the algorithm, CFB permits only four period lengths: 24, 48, 96, 192. The 24-bar version can see trend fractals up to 24 bars wide, and so on. You get all four versions when ordering CFB.

________________________________

Now that was Jurik

The main problem in building this indicator for metatrader was the shear number of buffers it must use for its calculations and the calculations itself. There were some attempts to make it, but those were stopped at a first step : making a basic calculation function and that was all that was done. This is the "real" one. With some additions of course

In this indicator the "period" is replaced with "depth" :
depth 1 -> period 24

depth 2 -> period 32

depth 3 -> period 48

depth 4 -> period 64

depth 5 -> period 96

depth 6 -> period 128

depth 7 -> period 192

What deviates from Juriks cfb is the post smoothing : since the slope should determine the "trending" or "no trending" that I thought that some smoothing would not hurt. Smoothing used is the one from one more average and gives satisfactory results. Do not confuse the Smooth parameter with SmoothResult, SmoothSpeedand SmoothAdaptiveparameters. Smooth is a part of cfb calculations and the last 3 are used to smooth the already calculated cfb.

PS: attached a welth lab source that I used as a model for this indicator. Do not be alarmed when you compare the two sources : that is cfb (value wise the same thing, believe me, just everything can be done a BIT differently and faster ) Also attached what can be found and what people wrongly believe to be a cfb : the cfbAux function (this function is a correct, if you compare it to those posted on some sites )


____________________________

Updated version posted here : Composite Fractal Behavior and its aplications


Sergey Golubev
Moderator
110880
Sergey Golubev  

Composite Fractal Behavior (CFB) invented by Jurik

The forum

  • Composite Fractal Behavior and its aplications - the thread with many good indicators

The articles

============

Sergey Golubev
Moderator
110880
Sergey Golubev  

Composite Fractal Behavior (CFB)

CFB tells you how long the market has been in a quality trend. This value can be used to adjust the period length of other indicators, especially stochastic bands. In order to quantify the overall duration of a market's trend, we replaced classical cycle analysis methods (FFT, MEM, MESA) with a form of analysis that works even when no cycles exist. We accomplished this by examining a time series for specific fractal patterns of any size. We then gather all the patterns found and combine them into one overall index, CFB (Composite Fractal Behavior) Index.

Composite Fractal Behavior and its aplications - good thread with the following indicators:

  • CFB indicator, CFB channel, CFB_adaptive Stochastic Confidence Bands indicator, CFB stochastic, cfb new and cfb channel new indicators, cfb channel new - separate indicator.
  • Cfb - normalized, Cfb - zero mean (z-score) normalized, Cfb - sigmoidal (logistic and hyperbolic) normalized, Cfb - logarithm modified sigmoidal (logistic and hyperbolic) normalized.
  • Velocity cfb adaptive indicator, Dynamic zone velocity cfb adaptive dj indicator and Dynamic zone velocity cfb adaptive 1.01 indicator (Velocity that uses cfb for changing / adapting it's length. The velocity itself is a smoothed momentum indicator and can be used as a signal indicator but the "cfb adaptive" is different indicator which gives dramatically faster crosses for the signal).
  • cfb mtf indicator (Multi Timeframe version of Composite Fractal Behavior and the other MTF version - cfb call).
  • cfb channel new on ds jurik , Rvi on jurik cfb adaptive indicator, rsx cfb adaptive dj new and velocity cfb dj adaptive new indicators (These are similar yet a little different, used jurik smoothing for these 3, with double smooth = true then it is using double smooth jurik, and with it set to false uses regular jurik).
  • cfb adaptive wpr's on bands indicators, cfb adaptive smooth wpr with bands_mtf_arrows_alerts + delayed indicator, Cfb adaptive Dmx nrp indicator (Its multitimeframe with alerts on slope change), cfb channel stop_mtf_alerts indicator, cfb new jurik mtf_alerts indicator.
  • Cfb adaptive adx indicator (This is Wilders Adx jurik smoothed, using cfb to make the adx length adaptive, using the Short and Long Limit, it is mtf with alerts, with the alerts going off if positive slope of adx and its greater than trigger level (set to 20 by default, but its changeable) and plus greater than minus for buy and plus less than minus for sell), cfb adaptive rsx-jma-nrp indicator (RSX not smoothed with jma, but using guess you could call it an JMA smoothed with RSX, anyway has multialerts for jurik and rsx cross, rsx slope, and rsx slope with jma cross). 
  • cfb call indicator for Metatrader 5, cfb channel indicator for Metatrader 5, cfb_channel stop_mtf_alerts indicator.

============

Fractals MTF alerts

It is very advanced multi timeframe fractal indicator with alerts. There are some good features such as how to show the arrows when showJustOneArrow parameter is set to true :
showArrowType parameter :
0 -> draw arrow just on the first bar of the target time frame
1 -> draw arrow just on the last bar of the target time frame
2 -> draw arrow when the high is equal to high fractal or low is equal for low fractal
Additional option is to show the arrow just on the first bar of the target time frame fractal, or to repeat it on every bar belonging to that time frame bar. 

  1. Fractals MTF alerts indicator - the post and this post.
  2. Fractals mtf alerts 2 indicator - the post: it will not alert you on a first start, on time frame change, on parameters change ... It will alert only if a new fractal is drawn. So it can alert only once for a fractal.
Richard Caughell
1386
Richard Caughell  
Mladen Rakic:

Which latest version are you referring to?

Latest versions of the cfb itself were posted here :

And they are working OK

On the other hand, if you are trying to use dynamic zones version, you have to have dynamiczones.dll in the libraries folder and you have to enable dll imports in the indicators properties - or else, it will not work. The dll you can download from here : https://www.mql5.com/en/forum/179876


It seems their is nothing on page 13 for coding?


The cfb_adabtive_smoothed_cci_2 or 2.1 neither seems to work on mt4, maybe Im doing something wrong? 


Or any of the other ones, all I get is a blank indicator window. dll imports is selected also. Any suggestions? 

Files:
cfb_CCI.jpg 144 kb
Mladen Rakic
139662
Mladen Rakic  
Richard Caughell:

It seems their is nothing on page 13 for coding?


The cfb_adabtive_smoothed_cci_2 or 2.1 neither seems to work on mt4, maybe Im doing something wrong? 


Or any of the other ones, all I get is a blank indicator window. dll imports is selected also. Any suggestions? 

Page 13 seems to have fallen as a victim to one of the many "migrations" that the forex tsd forum had been gone through - unfortunatelly, as far as I know, nothing can be done regarding that

As of the rest : use the "nmc" (New Metatrader 4 Compatible) versions (ie: the newer versions, since, due to changes that mt4 has undergone some older code needed so changes). So, simply go further the thread and you shall find those versions too or simply recompile the code a couple of times (eventually the build 1090 will get it right and the values are going to re-appear since there is nothing wrong with the code in some cases when line display is used)

Richard Caughell
1386
Richard Caughell  
Mladen Rakic:

Page 13 seems to have fallen as a victim to one of the many "migrations" that the forex tsd forum had been gone through - unfortunatelly, as far as I know, nothing can be done regarding that

As of the rest : use the "nmc" (New Metatrader 4 Compatible) versions (ie: the newer versions, since, due to changes that mt4 has undergone some older code needed so changes). So, simply go further the thread and you shall find those versions too or simply recompile the code a couple of times (eventually the build 1090 will get it right and the values are going to re-appear since there is nothing wrong with the code in some cases when line display is used)


Such a simple fix, haha I wish I knew more about this kinda stuff. Thanks a lot. 

Willhelm Friedrich
96
Willhelm Friedrich  
I tried to put the CFB indicator on my chart but couldn't see the actual indicator even though it compiled and was showing the correct data in the window.  I tried everything, including switching to a different computer. I thought I was going insane. 

Turns out it's a bug in build 1090.  The fix is changing the code and recompiling it as Mladen explains here:  https://www.mql5.com/en/forum/170914#comment_5642504
Indicators: Schaff trend cycle - adjustable smoothing
Indicators: Schaff trend cycle - adjustable smoothing
  • 2017.02.23
  • www.mql5.com
Schaff trend cycle - adjustable smoothing: Author: Mladen Rakic...
To add comments, please log in or register