TradingView
pythagoras
2016年12月12日午前5時6分

Fractal Resonance Composite 

E-mini S&P 500 Futures (Dec 2016)CME

詳細

Fractal Resonance Composite compresses 8 timescales of stochastic oscillators into just 3 color-coded composite lines: fast, medium and slow. Fast emphasizes the shorter timescale oscillators, medium considers all 8 timescales evenly, and slow emphasizes the longer timeframe oscillators. The composite lines indicate how overbought/sold the market is relative to the size of its recent movements. Major buys occur when all three composites enter the Oversold (green shaded) range and turn up, and major sells when all three reach the Overbought (red shaded) range and turn down. The fast line's quicker reversals and exaggerated alternations on smaller price moves makes it more fit for scalping. Notice the fast and medium lines tend to snap back toward the slow line like stretched rubber bands.

As is particularly apparent in the slow line, the nifty mathematics of the compositing process reconstruct the topology (peaks and valleys) of the underlying price curve in a smoothly distorted "cartoon" form that has a very useful property: the composite lines are confined to +-100% Extreme Overbought/sold oscillatory ranges. (By definition, only extremely rare "parabolic" moves can push all 3 composites beyond +-100%). If we knew that price would always stay confined to a certain range, trading would be much easier, no? Always buy the bottom of the range and sell the top!

How it works
To understand what's behind this nifty property, consider the mathematics of LazyBear's WaveTrend port .
The formula is fairly simple as indicators go yet statistically fundamental in a way that suggests it should have been the grandfather of all market stochastic oscillators. It's just a running average of the ratio:

(price's current deviation from it's mean)
-----------------------------------------------------------
(running average of absolute |price deviation from the mean| )

In formal statistics notation this is written:

E{ (X - E{X}) / E{|X-E{X}|} }

Where X is the price random variable and E{} the averaging or Expectation operator, implemented in this oscillator as exponential moving averages.

Conceptually, the denominator measures and normalizes by the typical size of recent price moves. This normalization process is what stretches or compresses the local price movements such that the whole composite curve can stay within the oscillatory range.

Attributes
The default fast=.6, medium=1, slow=1.4 compositing factors give each line visually distinct behavior, but can be tweaked to emphasize different oscillator "speeds".

Particular lines can be disabled by setting their line width to 0.
コメント
pythagoras
You may be wondering (like I did) why the fractal resonance (AKA wave trend) oscillators seem superior to other standard indicators.

Of the standard charting indicators, the Bollinger %B oscillator has the most conceptual similarity to fractal resonance oscillator.
In statistical notation we can express Bollinger %B as:

100% * (X - E{X}) / square_root( E{ (X-E{X})*(X-E{X}) } )

So %B is also a ratio that normalizes current price deviation from a mean by the typical size or range of recent price changes.

However, the detailed implementation of %B is considerably more primitive:

1. %B does not do expectation (averaging) of the ratio itself, so %B is way less smooth than fractal resonance oscillator.

2. %B implements expectation E{} with simple moving averages (usually 20 bars) rather than exponential moving averages, so %B completely forgets about any big price changes more than 20 bars in the past. Fractal resonance thus has a longer term, more gradual memory.

3. %B denominator uses "standard deviation", an "L2 norm" or square root of sum-of-squares statistic to measure the typical size of recent price changes, whereas fractal resonance uses an "L1 norm" or absolute value of price deviations in its normalizing denominator. "L2 norms" are theoretically optimal for measuring Gaussian (en.wikipedia.org/wiki/Normal_distribution) randomness. But we don't believe market prices actually follow a Gaussian distribution for very long at all -- in the long run the mean and variance of market prices don't converge to any particular value. The market is fractal -- perhaps locally confined to a particular mean and variance, but potentially shifting to a completely different fractal scale with much larger variances at any time! This is more typical of a Cauchy distribution (en.wikipedia.org/wiki/Cauchy_distribution), for which long term mean and variance are actually undefined -- they never converge! "L1 norms" typically work better for measuring Cauchy random variables.

Also note that range of %B is officially defined as 0 to 100% instead of -100% to 100%. To convert the statistical expressions above to 0-100% range, simple add 100% and divide by 2.
joepeeer
thank you 4 all d hard work
coininvestor
Very nice work on this one. May I suggest that you set the transparency of the plots with a user defined variable?

This will allow the user to change the transparency of the entire bar with one number rather than changing each color individually.

Transparency is defined in the plot with transp=x
coininvestor
The above comment was meant for the "Fractal Resonance Bar." However, it would be very useful to have it on this script as well.
anoojpatel
Amazing indicator! I was wondering how you composite the Fractal components, and how the speeds (0.6, 1, 1.4) play with the calculation of the stochastic trend?
詳細