![]() |
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
|
|||||||
| Reference Samples Official NinjaScript reference code samples |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Reference sample for NinjaTrader 7.0.xxxx.x or greater.
When accessing NinjaScript indicators in other scripts it is important to check if the hosted indicator's plot values are already set prior to use in the hosting script. This check ensures that proper values are always used and that irrelevant values do not throw off the script logic. This reference sample demonstrates how to run these checks in a hosting indicator by checking another hosted indicator for set plot values. Another example for when you would want to use this is if you were trying to access the Pivots indicator, but did not have enough days loaded to properly calculate those values yet. Basing logic on the Pivots in such a scenario would yield values that are not useful and can be detrimental if not handled correctly in your code. This reference sample demonstrates the following concepts:
Josh
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Josh for this post: |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Accessing indicator values without plots | suprsnipes | Indicator Development | 1 | 08-25-2010 05:23 AM |
| Indicator Accessing Indicator Where User Has Set Parameters | dkrumholz | Indicator Development | 1 | 04-27-2010 02:56 PM |
| Accessing variable from a 5min Indicator and 15min Indicator | mefTrader | Market Analyzer | 8 | 01-12-2010 09:14 AM |
| Accessing Multiple Custom Indicator Plots within a Strategy | whitmark | Strategy Development | 15 | 03-28-2009 04:21 PM |
| Indicator: Exposing indicator values that are not plots | NinjaTrader_Josh | Reference Samples | 0 | 01-15-2008 02:27 AM |