frankie.baumann

Fractals average breakout [FB]

16613 뷰
1481
My first indicator.
A simple average of last 1 to 10 fractals (top and bottom)
Trade breakouts of top or bottom lines.
Feel free to use and experiment with.
Frank Baumann
오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?
//
// @author frankie.baumann
//

study("Fractals average breakout [FB]",shorttitle="FAB",overlay=true)

LookBack = input(5,minval=1,maxval=10)
ShMid = input(true, type=bool, title = "Show Midline?")
ShFL = input(true, type=bool, title = "Show Fractal lines?")

th = high[2]>high[1] and high[2]>high and high[2]>high[3] and high[2]>high[4] ? -1 : 0

bl = low[2]<low[1] and low[2]<low and low[2]<low[3] and low[2]<low[4] ? 1 : 0

tot = th + bl
pl = abs(tot)>=1 ? 1 : 0

// plotarrow(pl==1 ? tot : na,colorup=green,colordown=red,offset=-2,maxheight=10)

lowline = (valuewhen(tot==1, low[2], 0) + (LookBack>1 ? valuewhen(tot==1, low[2], 1) : 0)
    + (LookBack>2 ? valuewhen(tot==1, low[2], 2) : 0) + (LookBack>3 ? valuewhen(tot==1, low[2], 3) : 0)
    + (LookBack>4 ? valuewhen(tot==1, low[2], 4) : 0) + (LookBack>5 ? valuewhen(tot==1, low[2], 5) : 0)
    + (LookBack>6 ? valuewhen(tot==1, low[2], 6) : 0) + (LookBack>7 ? valuewhen(tot==1, low[2], 7) : 0)
    + (LookBack>8 ? valuewhen(tot==1, low[2], 8) : 0) + (LookBack>9 ? valuewhen(tot==1, low[2], 9) : 0)
    )/LookBack
plot(ShFL ? lowline : na, style=line, linewidth=2, color=green) //, offset=-2)

highline = (valuewhen(tot==-1, high[2], 0) + (LookBack>1 ? valuewhen(tot==-1, high[2], 1) : 0)
    + (LookBack>2 ? valuewhen(tot==-1, high[2], 2) : 0) + (LookBack>3 ? valuewhen(tot==-1, high[2], 3) : 0)
    + (LookBack>4 ? valuewhen(tot==-1, high[2], 4) : 0) + (LookBack>5 ? valuewhen(tot==-1, high[2], 5) : 0)
    + (LookBack>6 ? valuewhen(tot==-1, high[2], 6) : 0) + (LookBack>7 ? valuewhen(tot==-1, high[2], 7) : 0)
    + (LookBack>8 ? valuewhen(tot==-1, high[2], 8) : 0) + (LookBack>9 ? valuewhen(tot==-1, high[2], 9) : 0)
    )/LookBack
plot(ShFL ? highline : na, style=line, linewidth=2, color=red)

MidLine = (highline+lowline)/2
plot(ShMid ? MidLine : na, style=line, linewidth=2)

코멘트

thx. Just a question: when the buy or sell signals (arrows) get generated in real time? Is it after the close of the candle?
+8 응답
Sorry ... I forgot to click reply ... my answer is below :)
+19 응답
Great !!!

I'm trying to find an ajustable *
MetaTrader5 indicator similar to Your
Fractal Average Breakout
(ot learn to code mql5) :

Average Line for
Last 2 HH/LL
Last 3 HH/LL
Last 4 HH/LL
Last 5 HH/LL
Last 6 HH/LL
Last 7 HH/LL
Fractals 5(2*2) or 3(1*1) or 7(3*3) etc.

But when Line of
Line of Last 3 HH/LL Fractals appear
it will be good that the
Line for Last 2 HH/LL Fractals disappear

& when Line of
Line of Last Fractals HH/LL appear
it will be good that the
Line for Last Fractals HH/LLdisappear,

etc.

_
*) Adjustable :
- Fractal ## of symetric bars: 5(2+1+2), 3(1+1+1), etc. Bars.
- Conditions for disappearing of average levels.

|
Do you know is there similar indicator for MetaTrader 5(4) ?
.
+1 응답
@Sinuhet
Oh no ... the arrows are just my own fractals indicator. There are no buy and sell signals. The indicator here is only the 3 lines Top Bottom and Middle.
The Top line is the average of the last 5 top fractals.
The Bottom line is the average of the last 5 bottom fractals.
The Middle line is just the average of the Top and Bottom lines.
I am looking at trades breaking out over the Top or Bottom lines (To be confirmed by other indicators as well)
I just use the raw fractals to get a better perspective of the breakouts and also look at volatility and any oscillator to help me make a decision.
In other words, I try to look at the big picture before I make any decision :)
+1 응답
Sinuhet frankie.baumann
nice thank you for reply. I am using TD-Sequential and as by any indicator, I need always to follow higher time frames to avoid trade againts the trade. This breakout stuff is interesting to me - perhaps I can use your technique with +/- volume to to detect Elliott Wave 3. The EW oscillator is simply not very reliable.
응답
Feel free to experiment... :)
I am currently exploring breakouts to trade short term options. And I always look at higher time frames to get an idea of the sustainability of the trend and if the breakout corresponds. I also noticed that you can easily see consolidation in the price when the Top and Bottom lines are close together.
I like fractals because they tend to adapt to the market movement unlike moving averages.
Enjoy!
응답
Sinuhet frankie.baumann
yes, fractals/cycles do work for some time until not and are changed by another fractal/cycle. Moving averages are for nothing, because they just tracked past price action. But TD sequential is different story. Of course they are some false signals (aka BUY setup, but trend continues lower) but if I could combine it with some breakout/volatility indicator that would be nice. I will experiment with your work. Once again Thank you. Sinuhet
Btw. I find interesting your point regarding distance of both external lines to each other - if they get too close to each other, a major move is ahead. Would be of value to quantitatively describe this distance as an indicator with some absolute value? Just looking on both lines remains very subjective...
응답
Dear my friends,

Would you please help to code this indicator in MT4 platform? I really love this indicator and going to apply it in trading.

Thank you in advance
응답
Hi,

It's really interesting indicator and i'd like to know other indicator as well the bottom pane indicator named "Fractal volatility" is this available in public library or your own indicator.

If u don't mind can you please share

Thanks,
Allen.
응답
great work!
응답