PINE LIBRARY
已更新 Fibonacci

Library "Fibonacci"
General Fibonacci functions. Get fib numbers, ratios, etc.
fib_precise(f, precision)
Get the precise Fibonacci ratio, to the specified number of decimal places
Parameters:
f: Fibonacci ratio (string, in form #.###)
precision: Number of decimal places (optional int, dft = 16, max = 32)
Returns: Precise Fibonacci ratio (float)
fib_n(n)
Calculate the Nth number in the Fibonacci sequence
Parameters:
n: Index/number in sequence (int)
Returns: Fibonacci number (int)
General Fibonacci functions. Get fib numbers, ratios, etc.
fib_precise(f, precision)
Get the precise Fibonacci ratio, to the specified number of decimal places
Parameters:
f: Fibonacci ratio (string, in form #.###)
precision: Number of decimal places (optional int, dft = 16, max = 32)
Returns: Precise Fibonacci ratio (float)
fib_n(n)
Calculate the Nth number in the Fibonacci sequence
Parameters:
n: Index/number in sequence (int)
Returns: Fibonacci number (int)
版本注释
v2Added "fib" 1.414
版本注释
v3Added:
fib_from_string(r)
Get fib ratio value from string
Parameters:
r: Fib ratio string (e.g. ".618")
Returns: Fibonacci ratio value (float)
版本注释
v4Hard-coded precise fibs for efficiency (rather than deriving them)
Added:
fib_derived(f, precision)
Get the precise Fibonacci ratio, to the specified number of decimal places
Parameters:
f: Fibonacci ratio (string, in form #.###)
precision: Number of decimal places (optional int, dft = 16, max = 32)
Returns: Precise Fibonacci ratio (float)
* Deprecated (use fib_precise() instead), but keeping it here for science / experimenting with derivations
Pine脚本库
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine脚本库
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
免责声明
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.