![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jul 2007
Location: Taunton, MA
Posts: 202
Thanks: 1
Thanked 0 times in 0 posts
|
I have a proprietary third-party indicator that has some of its parameters in a grid category called Signal. I'd like to add this indicator to a chart from a strategy and then change some of the settings of the Signal parameters. Is that possible, or can I only specify Parameters when the indicator is added and subsequently access Plots and Lines? In other words, can I get at the values in the Signal grid category, or are they out of reach?
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello MikeInMA,
You can only access indicator plots from another script without having to do additional coding. It's possible to access other values, but you will need to be able to edit the code of your indicator. This sample demonstrates exposing values that aren't plots.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jul 2007
Location: Taunton, MA
Posts: 202
Thanks: 1
Thanked 0 times in 0 posts
|
Doing a little more poking around, it actually looks like it's pretty simple to do what I was trying to do, and access to the indicator's code is not necessary. In this case I'm working with a 3rd-party proprietary indicator, so I can't access the code, anyway. However, I know this indicator has a parameter called SignalSize in a grid category called Signal. And it turns out that in my strategy's Initialize() routine I can directly reference indicator().SignalSize. Easy.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Yes, that should work. The code added to the called indicator helps make sure that the value is up to date, but if you're referencing a static value this shouldn't affect you much.
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Indicator with numerous parameters | annettes | Indicator Development | 7 | 09-07-2010 03:42 AM |
| Varying Indicator Parameters | FatCanary | Indicator Development | 20 | 07-25-2010 03:05 PM |
| Indicator parameters from within a strategy | astrolobe | Indicator Development | 1 | 06-20-2009 11:05 PM |
| Possible to use [Category("Parameters")] attribute to make a 10-item combobox appear? | ChiTrader2000 | Strategy Development | 2 | 03-22-2009 04:34 PM |
| Is it possible to define sub category or user define category for parameters | theperm | Strategy Development | 7 | 05-16-2007 08:48 AM |