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.

Reply
 
Thread Tools Display Modes
Old 08-25-2009, 02:04 PM   #1
murfinp
Senior Member
 
Join Date: Jan 2007
Location: , ,
Posts: 133
Thanks: 1
Thanked 0 times in 0 posts
Default Accessing Custom Indicator Values

Hi

If I have a custom indicator call it myIndicator and it returnd 4 timeseries how do i access the previous bar value of the 2nd or 3rd timeseries it returns?

Thanks

Paul
murfinp is offline  
Reply With Quote
Old 08-25-2009, 02:08 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

Paul,

Accessing historical values are always done via [] indexing. If you want the previous bar you would go [1]. To get the other exposed series you would need to access the specific series directly.

myIndicator().Series2[1]
myIndicator().Series3[2]
NinjaTrader_Josh is offline  
Reply With Quote
Old 08-25-2009, 02:11 PM   #3
murfinp
Senior Member
 
Join Date: Jan 2007
Location: , ,
Posts: 133
Thanks: 1
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Josh View Post
Paul,

Accessing historical values are always done via [] indexing. If you want the previous bar you would go [1]. To get the other exposed series you would need to access the specific series directly.

myIndicator().Series2[1]
myIndicator().Series3[2]
Rhanks Josh
murfinp 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
Accessing Data from custom Indicator murfinp Strategy Development 4 04-03-2009 06:31 AM
Accessing Multiple Custom Indicator Plots within a Strategy whitmark Strategy Development 15 03-28-2009 04:21 PM
Accessing Multi Timeframe Indicator Values TAJTrades Indicator Development 11 03-02-2009 07:11 AM
Accessing value from custom indicator from strategy funk101 Strategy Development 12 08-19-2008 08:41 AM
Accessing Custom Indicator Functions in Strategies ThePatientOne Strategy Development 1 05-29-2007 01:29 PM


All times are GMT -6. The time now is 07:44 AM.