SighTTrader

AutoFib Extensions -by Stocksight

Autofib Extensions will automatically appear instantly when the candle breaks the high based on the period selected. Updates itself instantly, will show you the price of each level at the moment. Default uses a 3 period offset but can be modified.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//Auto Fib Extentions created by Stocksight January 1, 2016 Version 1.0

study("AFEXT", overlay=true, max_bars_back= 89)
z = input (50)
p_offset=input(3)

a=(lowest(z)+highest(z))/2
b=lowest(z)
c=highest(z)

//fib extension Calcs
fib1 = (((c-b)*1.13)+b)
fib2 = (((c-b)*1.272)+b)
fib3 = (((c-b)*1.41)+b)
fib4 = (((c-b)*1.500)+b)
fib5 = (((c-b)*1.618)+b)
//Calcs for a total of 7 fib extensions available, only four will plot.
fib6 = (((c-b)*1.764)+b)
fib7 = (((c-b)*2.00)+b)

fib8 = (((c-b)*-.13)+b)
fib9 = (((c-b)*-.272)+b)
fib10 = (((c-b)*-.41)+b)
fib11 = (((c-b)*-.500)+b)
fib12 = (((c-b)*-.618)+b)
fib13 = (((c-b)*-.764)+b)
fib14 = (((c-b)*-1.00)+b)

p1 = close > c[p_offset] ? fib1[p_offset] :na
p2 = close > c[p_offset] ? fib2[p_offset] :na
p3 = close > c[p_offset] ? fib3[p_offset] :na
p4 = close > c[p_offset] ? fib4[p_offset] :na
p5 = close > c[p_offset] ? fib5[p_offset] :na

p8 = close < b[p_offset] ? fib8[p_offset] :na
p9 = close < b[p_offset] ? fib9[p_offset] :na
p10 = close < b[p_offset] ? fib10[p_offset] :na
p11 = close < b[p_offset] ? fib11[p_offset] :na
p12 = close < b[p_offset] ? fib12[p_offset] :na


plot(p1, color =yellow, style=linebr,join = true)
plot(p2, color = gray, style = linebr, join = true)
plot(p3, color = gray, style = linebr, join = true)
plot(p4, color = red, style = linebr,join = true)
//plot(p5, color = black, style = linebr,join = true)


plot(p8, color =yellow, style=linebr, join = true)
plot(p9, color = gray, style = linebr,join = true)
plot(p10, color = gray, style = linebr,join = true)
plot(p11, color = red, style = linebr,join = true)
//plot(p12, color = black, style = linebr, join = true)