NinjaTrader Support Forum  
X

Attention!

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


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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-31-2010, 11:13 PM   #1
8DTK8
Senior Member
 
Join Date: Jun 2008
Posts: 168
Thanks: 0
Thanked 0 times in 0 posts
Default Help with inner workings of FloatSeries Class

I have been having decent success working with adding a FloatSeries Class with the excellent samples in http://www.ninjatrader.com/support/f...ead.php?t=4991 .

One thing that I have come across that I had quite the time figuring out is the nature of the [bars ago] suffix and what it's actually doing.

I have an indicator that writes to the float series every on bar update.

The float series contains values that are held constant with an occasional change. Here's where it gets interesting and has been the source of headache.

When I compare this.myFloatSeries[0] to this.myFloatSeries[1], it produces the last two values that are different.

So if the series contains:
bars ago & value
[0] 5
[1] 5
[2] 5
[3] 7
[4] 7
[5] 7
[6] 7
[7] 9
[8] 9

this.myFloatSeries[0] and this.myFloatSeries[1] returns 5 and 7
similarly
this.myFloatSeries[1] and this.myFloatSeries[2] seem to return 7 and 9

It seems to be ignoring all repeated values.

If someone could tell me if this is what it is supposed to do or if my amateur/novice programming status has finally caught up with me, I would greatly appreciate it.

Thanks.
8DTK8 is offline  
Reply With Quote
 

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
referencing a class d.allen101 Strategy Development 4 01-08-2010 06:52 AM
TradeCollection Class astrolobe Strategy Development 1 09-21-2009 05:39 AM
Helper class blarouche Strategy Development 9 08-11-2009 12:35 PM
Chart Class? cassb General Programming 2 06-12-2009 10:14 PM
Shared class SteveB General Programming 7 12-20-2008 04:35 PM


All times are GMT -6. The time now is 01:16 PM.