PINE LIBRARY

JohnEhlersFourierTransform

已更新
Library "JohnEhlersFourierTransform"
Fourier Transform for Traders By John Ehlers, slightly modified to allow to inspect other than the 8-50 frequency spectrum.
reference:
mesasoftware.com/papers/FourierTransformForTraders.pdf

high_pass_filter(source) Detrended version of the data by High Pass Filtering with a 40 Period cutoff
  Parameters:
    source: float, data source.
  Returns: float.

transformed_dft(source, start_frequency, end_frequency) DFT by John Elhers.
  Parameters:
    source: float, data source.
    start_frequency: int, lower bound of the frequency window, must be a positive number >= 0, window must be less than or 30.
    end_frequency: int, upper bound of the frequency window, must be a positive number >= 0, window must be less than or 30.
  Returns: tuple with float, float array.

db_to_rgb(db, transparency) converts the frequency decibels to rgb.
  Parameters:
    db: float, decibels value.
    transparency: float, transparency value.
  Returns: color.
發布通知
v2 removed the upper limit for the function, corrected a typo in the code, thanks to Al-M for spotting it :)
發布通知
v3 - another typo bytes the dust.. tump tump tump oO", nicely spoted by Al-M :)
發布通知
v4 fixed the preview chart..
arraysDFTfouriertransformjohnehlersspectrumstatisticstechindicator

Pine腳本庫

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

免責聲明