![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2010
Posts: 406
Thanks: 22
Thanked 23 times in 12 posts
|
My indicator computes a simple median of the last X bars of data. The input series to my indicator will usually either be the VOL indicator, or the Range indicator.
However, I would also like the ability to exclude certain dates from my calculation. However, if VOL is the input to my indicator, checking the date by accessing "Time[0]" returns a time of 1/1/1800. The input to the VOL indicator is some price data series, like the Close. Is there a way to get to the price bar from my indicator? I would like to keep this indicator generic so that it can take any input series and would rather not have to feed it price bars as input so that I can access the dates. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
|
Your observation is correct JoshDance - to access the bars timestamps via the indicator on indicator approach, please add a price series programmatically in your script and then for example use Times[index][barsback] to access them.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Obtaining historical forex data | Dommel | Miscellaneous Support | 4 | 07-29-2011 04:11 PM |
| way to get price based on time in range bar chart | tulanch | Indicator Development | 1 | 12-17-2010 03:58 AM |
| New bar start based on system time? | mazachan | Charting | 7 | 03-05-2009 12:48 PM |
| Obtaining Last Volume and Price from IB? | palinuro | General Programming | 2 | 04-08-2008 09:33 AM |
| Obtaining Data | HelloHello | Miscellaneous Support | 3 | 08-22-2007 06:06 PM |