![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Certified NinjaScript Consultant
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
|
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 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
On your NinjaScripts you'll need to add a "using" line calling the library.
Code:
using fftwlib; You will probably need to do the part here about adding a reference. http://www.ninjatrader-support.com/H...ndicators.html
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Certified NinjaScript Consultant
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Sorry I am unfamiliar with these procedures and cannot provide further support.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Certified NinjaScript Consultant
Join Date: Oct 2007
Location: Northern Illinois
Posts: 256
Thanks: 0
Thanked 3 times in 3 posts
|
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 |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
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. |
|
|
|
|
|
#7 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
PrTester,
I removed your post since it linked to a competitive product. Thanks for your understanding.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2007
Posts: 212
Thanks: 0
Thanked 3 times in 3 posts
|
|
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Nov 2005
Location: , Ontario, Canada
Posts: 400
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|