Composite Fractal Behavior and its aplications - page 17

 

Alternative ichomoku cfb

HELLO MR TOOLS,

Many thanks for the great work and service you are rendering.

Can you kindly help me create an HISTO VERSION of PRICE crosssing over the STOP ORDER LINE of the alternative ichimoku cfb on post 53.

When price CLOSES ABOVE the STOP ORDER LINE the Histo will show GREEN COLOR , and when price CLOSES BELOW the STOP ORDER LINE the HISTO will show RED COLOR.

THANKS IN ADVANCE

 

winner246

Can you post the source (.mq4 not .ex4)?

winner246:
HELLO MR TOOLS,

Many thanks for the great work and service you are rendering.

Can you kindly help me create an HISTO VERSION of PRICE crosssing over the STOP ORDER LINE of the alternative ichimoku cfb on post 53.

When price CLOSES ABOVE the STOP ORDER LINE the Histo will show GREEN COLOR , and when price CLOSES BELOW the STOP ORDER LINE the HISTO will show RED COLOR.

THANKS IN ADVANCE
 

Source

hello MLADEN,

i originally got it here at POST 53,THANKS

 
winner246:
hello MLADEN, i originally got it here at POST 53,THANKS

Hello Winner246,

This is the histo of that version.

 

Histo

Hello mr tools,

thank you very much

 
mladen:
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 )

Mladen

Since CFB should determine the "trending" or "no trending" can you make a multi symbol CFB indicator exactly like multi pair momentum https://www.mql5.com/en/forum/178416/page17 thank you very much.

 
nevar:
Mladen Since CFB should determine the "trending" or "no trending" can you make a multi symbol CFB indicator exactly like multi pair momentum https://www.mql5.com/en/forum/178416/page17 thank you very much.

nevar

Here is the multi pair cfb. Added slope coloring (since the rising slope in cfb means that there is trend and falling slope means that there is no current defined trend (it makes it a bit easier to determine if the trend is found or not). Decided to make it this way since this way you can jave unlimited number of symbols and you can have slope coloring (if I applied slope coloring to the way how multi symbols momentum was made, only two symbols could be drawn on the chart)

Files:
 
nevar:
Mladen Since CFB should determine the "trending" or "no trending" can you make a multi symbol CFB indicator exactly like multi pair momentum https://www.mql5.com/en/forum/178416/page17 thank you very much.

And this version too (done as that multi symbols version was made)

This one is limited to 8 symbols and it does not have a slope coloring (as I explained already, in that case only two symbols could be calculated and drawn on a same subwindow, ad that is why in this version I left out the slope coloring)

 

Due to latest "upgrades" of metatrader 4 some indicators are having a compile "errors". Here are some of those updated to be able to work in both build 509 as well as in new builds

 

One more that is adapted for these new changes