The Fractal Bands is a implementation of the Fractal Dimension into the Bollinger Bands. It’s purpose is to find potential mean reversion opportunities when price touch the upper or lower bands. The upper and lower bands are built open a FRASMA (Fractally Modified Simple Moving Average)
e_period (integer): This is the period considered for calculating the fractal dimension, default is 30.
normal_speed (integer): This is the speed of the SMA before being modified to become the FRASMA, default is 30.
alpha (real): This is the alpha from equation (2), default is 2.
Note from the author (Jean-Philippe Poton) about the use of the indicator:
The strategy is quite straightforward.
I enter in a BUY position after the price have rebounded (after touching it) from the lower band and crossed the FRASMA, my Stop Loss is then set to the level the prices hit the lower band, and my Take Profit is when the prices hit the higher band.
Symmetrically, I enter a SELL position after the price have fallen from the higher band (after touching it) and crossed the FRASMA, Stop Loss set at the level of the hit of the higher band, and Take Profit when the lower band is hit.
It is obviously possible (and even advised) to make your Stop Loss trailing the price changes.
I used this strategy for EUR/USD on a 5 minutes timeframe, using it on other timeframes or on other instruments may require a different setup, mine was to set the speed of the FRASMA at 30, and α=2 (in equation (2) above), it is possible to change these values.
Indicator translated from MT4 version by a request in the French forum.
//PRC_Fractal Bands | indicator
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//translated from MT4 code
//---end of settings
gperiodminus1=eperiod - 1
priceMax = highest[eperiod](inputData)
priceMin = lowest[eperiod](inputData)
for iteration=0 to gperiodminus1 do
if iteration>0 then
if (length>0.0) then
hurst=2-fdi // The Hurst exponent
traildim=1/hurst // This is the trail dimension, the inverse of the Hurst-Holder exponent
ExtOutputBuffer=average[speed](close)//iMA(NULL,0,speed,0,0,0,pos); // Buffer of the FRASMA
deviation=2*Sqrt(sum/eperiod) // 2 standard deviations around the frasma
return upperbuffer,lowerbuffer,ExtOutputBuffer style(line,2)
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :