NinjaTrader Support Forum  

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

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-08-2010, 01:51 PM   #1
MikeInMA
Senior Member
 
Join Date: Jul 2007
Location: Taunton, MA
Posts: 202
Thanks: 1
Thanked 0 times in 0 posts
Default When indicator parameters not in Parameters category

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?
MikeInMA is offline  
Reply With Quote
Old 11-08-2010, 02:06 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

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.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 11-08-2010, 03:21 PM   #3
MikeInMA
Senior Member
 
Join Date: Jul 2007
Location: Taunton, MA
Posts: 202
Thanks: 1
Thanked 0 times in 0 posts
Default

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.
MikeInMA is offline  
Reply With Quote
Old 11-08-2010, 03:24 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

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.
NinjaTrader_RyanM 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
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


All times are GMT -6. The time now is 03:35 PM.