Low Frequency Fourier Transform

This Study uses the Real Discrete Fourier Transform algorithm to generate 3 sinusoids possibly indicative of future price.
I got information about this RDFT algorithm from "The Scientist and Engineer's Guide to Digital Signal Processing" By Steven W. Smith, Ph .D.

It has not been tested thoroughly yet, but it seems that that the RDFT isn't suited for predicting prices as the Frequency Domain Representation shows that the signal is similar to white noise, showing no significant peaks, indicative of very low periodicity of price movements.
Release Notes: There was a compiling error happening recently. Tradingview propably changed their compiler, as the code successfully compiled before. This update addresses that and fixes the error that was happening during compilation.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


I was "playing" with this and I used the polynomial lsma estimation on each curve and for the blue and the red, the resulting line kinda follow the price yet the green produce a line somewhat similar to the green line, I only have the free version of tradingview but I kinda liked how they look also the green line appears to match well with the peaks of the price, there are patterns in the indicator... I can't see them well yet, but there are patterns.
+1 Svara
Wonderful script! FFT does seem to work for 64 periods. How does the FFT indicator handle sine waves of different Cycle Periods for consecutive time cycles ? Appreciate, if you can refine Or, submit your view. Thanks, Timeseeker
+1 Svara
AudienceXP AudienceXP
@AudienceXP, Hey, did you get time to check my earlier comments...love what you do...
xyse AudienceXP
@AudienceXP, I didn't really use it for my trading as I didn't seem to find it to be particularly useful. Can't really comment on that. I suggest you try it and if you have any interesting findings feel free to message me. Just decided to publish the script as there was no open-source fourier transform available on tradingview at the time of I wrote the script - thought it might be fun to try and implement it in pine script. Left it as a resource for coders to build upon in case anyone might need the code for their project. Best of luck for trading and have a good day, sir. Sorry for the late response I'm a lazy mf.
Impressive Script:

Trying to wrap my arms around what you are doing.

You are doing a Fourier Transform on the Price, over specific time range.
The Transform is generating 3 sine waves each representing the magnitue of a unique Time Frame(or Frequency) ?

+1 Svara
xyse trendinator
@trendinator, Yea you got it, that's it essentially. If you wanna get into the details I'd recommend you check out the link I put into the source code comments, where I got the algorithm from. I just tried to port the algorithm to pinescript as best as possible. Have a nice day.
well done man, what a wonderful first script! :)
+1 Svara
Very useful !
+1 Svara
hit me up on twitter if you get a mo...
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Hur det fungerar Diagramfunktioner Priser Tipsa en vän Ordningsregler Hjälpcenter Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Hänvisade vänner Mynt Mina kölappar Hjälpcenter Privata meddelanden Chatt Logga ut