Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

FFT...dare I try it?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    FFT...dare I try it?

    Hello,

    I've been beating my head against the wall trying to link to a free Fast Fourier Transform DLL (http://fftw.org and http://www.sdss.jhu.edu/~tamas/bytes/fftwcsharp.html) and I haven't been having any success.

    I'm relatively new to C# and the .NET framework, so instead of spending hours of trial-and-error in compilers, FAQ's and the like, I thought perhaps the community here might be willing to help. Basically, I need a C#/.NET genius! Anyone available to teach this old VAX Pascal programmer a lesson???

    Thank you,
    Ben

    #2
    On your NinjaScripts you'll need to add a "using" line calling the library.
    Code:
    using fftwlib;
    You will need to first install the library though. Try dropping the dll into your NinjaTrader install folder. If that doesn't work try dropping it into \My Documents\NinjaTrader 6\bin\Custom

    You will probably need to do the part here about adding a reference. http://www.ninjatrader-support.com/H...ndicators.html
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response, Josh.

      I had actually done the recommendations you gave me, but in the end of that, it came up with another, more troublesome error.

      Initially, the error was that it couldn't open another DLL (named libfftw3f-3.dll). So I hunted down that DLL, I put it in the correct NT folder and also added its reference on the chart, but upon compilation, it gave:

      libfftw3f-3.dll could not be opened -- 'An attempt was made to load a program with an incorrect format. ',CS0009


      That's the one I'm stuck at...any suggestions? Does anything need to be done with "lib.exe"??? Some of the FAQ's on the FFTW site mention to use lib.exe to create .def files??? But I'm lost at this point.


      Ben

      Comment


        #4
        Sorry I am unfamiliar with these procedures and cannot provide further support.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your reply, Josh...

          I think what I'm looking for is someone here to download the supplied code and actually try to link to the DLL's and work through the issues.

          Anyone else interested? According to the scientific literature I've seen, FFT's are an essential tool if you want to get some idea of the present cyclical tendencies of price action. The thought being, if you know the period of the dominant waveform, you can adjust the period of your moving averages, RSI's and Momentum indicators to help reduce the lag inherent in those indicators. Basically, the period of those laggy indicators should be 1/2 of the period of the dominant wave. (Please correct me if I'm wrong!)

          Ben

          Comment


            #6
            I'm not sure why, but John Ehlers says "This (FFT) unfortunately is not suitable for analysis of market data." See: http://www.mesasoftware.com/cyclestutorial.htm

            I found why he's said this ... its because he has a competing, proprietary analysis system he calls MESA, which he compares to fourier here: http://www.mesasoftware.com/fftcomparison.htm

            I don't have any experience with it, but Ehlers has been writing trading books for years, and I found his technical papers (same web site) interesting.

            Comment


              #7
              PrTester,

              I removed your post since it linked to a competitive product.

              Thanks for your understanding.

              Comment


                #8
                Originally posted by NinjaTrader_Dierk View Post
                PrTester,

                I removed your post since it linked to a competitive product.

                Thanks for your understanding.
                Dierk sorry, but I think it was an open source not a commercial product.

                Comment


                  #9
                  I would agree with him here Dierk

                  The deleted info was for an open-source TA library for use within Ninja... Not a competitive product.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by inanazsocial, Today, 01:15 AM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Jason  
                  Started by rocketman7, Today, 02:12 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post rocketman7  
                  Started by dustydbayer, Today, 01:59 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post dustydbayer  
                  Started by trilliantrader, 04-18-2024, 08:16 AM
                  5 responses
                  22 views
                  0 likes
                  Last Post trilliantrader  
                  Started by Davidtowleii, Today, 12:15 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post Davidtowleii  
                  Working...
                  X