NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 10-21-2008, 08:05 PM   #1
roland_nt
Senior Member
 
Join Date: Feb 2008
Posts: 103
Thanks: 0
Thanked 0 times in 0 posts
Default using variables form a prior bar's calulations

I am building a Fourier transform indicator which calculates 50 values for a certain parameter, let's say the parameter is named "Real".
So there is a Real[0] through Real[49] for the current bar (i.e. bar[0]).
The calculation needs to reference the prior bar's 50 values for Real (i.e. Bar[1]) as well as the 50 values of Real for the bar before that (bar[2]).

What NinjaTrader data type would I use to declare Real so that the prior bar's calculation values are available?

The NinjaTrader DataSeries type
only stores one value for each bar, not 50.

Real is not a straight 2 dimensional array, since that would reset every thing to 0 each time the indicator executes.

I really need sonething like this
(conceptual example only, might not be correct C#)
Real[3] = new DataSeries (this);
to be referenced in code possibly like this
N = Real[0][25] + Real[1][25] + Real[2][25];
and possibly loaded something like this
Real.Set(A*N-1)[0][25];

I do not need to keep any more than 3 bars back worth of 50 values for each bar.

If this is the wrong forum for this question, please direct me to the proper forum.
roland_nt is offline  
Reply With Quote
Old 10-22-2008, 08:42 AM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,


Unfortunately this is outside the scope of what we can offer support for on the forums. You may find what you want over on MSDN because this is a more advanced C# issue.
NinjaTrader_Ben is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using windows Form instead of file io Folls Strategy Development 49 11-08-2011 08:38 AM
Fix the contact us form on the website? raz0rback Suggestions And Feedback 1 10-08-2008 09:23 PM
Play sound to alert order confirmation form AJNIN Suggestions And Feedback 1 06-24-2008 09:21 AM
Data form Gain cattus Connecting 6 03-07-2008 05:15 AM
String form of Period Type zoltran General Programming 4 12-05-2007 10:40 PM


All times are GMT -6. The time now is 09:44 PM.