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)
發布通知
v2
Added "fib" 1.414
發布通知
v3

Added:
fib_from_string(r)
  Get fib ratio value from string
  Parameters:
    r: Fib ratio string (e.g. ".618")
  Returns: Fibonacci ratio value (float)
發布通知
v4
Hard-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
fibfiboMATH

Pine腳本庫

在真正的TradingView精神中,作者將這段Pine程式碼發佈為開源程式庫,以便我們社群的其他Pine程式設計師可以重複使用它。請向作者致敬!您可以私下使用這個函式庫,或在其他開源出版品中使用,但在出版物中再次使用這段程式碼將受到網站規則的約束。


更多:

免責聲明