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.
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.
Declinazione di responsabilità
Libreria Pine
In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Complimenti all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.