# [M] MTF Fibonacci levels

14616 lượt xem
14616
Automatic drawing Fibonacci levels for such lazy like me =)
For such lazy like me too :) YOU did a great Job this Fib Rtm is Golden.
Phản hồi
How do you create the labels on the right (Fib:61.8, Fib:50.0, etc.)??
Phản hồi
Great indicator. Just curious why there are two of each level? And I notice the 50% level sometimes is also the high/low of the period. Is that to show the direction? And when does it change colour? On close of candle?
Phản hồi
:(( I can't add to my favorite scripts. Please grant me the access.
Phản hồi
My indicator simply draws the fibo levels from high to low, I do not know why people like it and ask for its code. But if you need it, then take it)

//@version=2

study(title=' MTF Fibonacci levels', shorttitle='Fib', overlay=true)
TimeFrame = input('1D',type=string,title="Timeframe" )
fiblength=input(1,minval=1,title="Length")

zeroSrc = close > open ? high : low

Z_000 = security(tickerid, TimeFrame, sum(zeroSrc,fiblength)/fiblength)
H_100 = security(tickerid, TimeFrame, highest(high,fiblength))
L_100 = security(tickerid, TimeFrame, lowest(low,fiblength))

H_RANGE = H_100-Z_000
L_RANGE = Z_000-L_100

H_764 = H_100 - H_RANGE * 0.236
H_618 = H_100 - H_RANGE * 0.382
H_500 = H_100 - H_RANGE * 0.500
H_382 = H_100 - H_RANGE * 0.618
H_236 = H_100 - H_RANGE * 0.764

L_764 = L_100 + L_RANGE * 0.236
L_618 = L_100 + L_RANGE * 0.382
L_500 = L_100 + L_RANGE * 0.500
L_382 = L_100 + L_RANGE * 0.618
L_236 = L_100 + L_RANGE * 0.764

h100=plot( series=change(H_100)!=0?na:H_100, title="100", color=black, transp=0, linewidth=2,style=linebr)
h764=plot( series=change(H_764)!=0?na:H_764, title="76.4", color=yellow, transp=0,style=linebr, linewidth=2)
h618=plot( series=change(H_618)!=0?na:H_618, title="61.8", color=blue, transp=0,style=linebr, linewidth=2)
h500=plot( series=change(H_500)!=0?na:H_500, title="50.0", color=lime, transp=0,style=linebr, linewidth=2)
h382=plot( series=change(H_382)!=0?na:H_382, title="38.2", color=green, transp=0,style=linebr, linewidth=2)
h236=plot( series=change(H_236)!=0?na:H_236, title="23.6", color=red, transp=0,style=linebr, linewidth=2)
l236=plot( series=change(L_236)!=0?na:L_236, title="23.6", color=red, transp=0,style=linebr, linewidth=2)
l382=plot( series=change(L_382)!=0?na:L_382, title="38.2", color=green, transp=0,style=linebr, linewidth=2)
l500=plot( series=change(L_100)!=0?na:L_500, title="50.0", color=lime, transp=0,style=linebr, linewidth=2)
l618=plot( series=change(L_618)!=0?na:L_618, title="61.8", color=blue, transp=0,style=linebr, linewidth=2)
l764=plot( series=change(L_764)!=0?na:L_764, title="76.4", color=yellow, transp=0,style=linebr, linewidth=2)
l100=plot( series=change(L_100)!=0?na:L_100, title="100", color=black, transp=0, linewidth=2,style=linebr)
zero=plot( series=change(Z_000)!=0?na:Z_000, title="0.00", color=black, transp=0, linewidth=2,style=linebr)
Phản hồi