NinjaTrader Support Forum  

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 03-09-2011, 01:55 PM   #1
neb1998
Senior Member
 
Join Date: Jan 2011
Location: Illinois
Posts: 216
Thanks: 1
Thanked 0 times in 0 posts
Default Indicator Parameters

If i have an indicator that takes say 10 parameters that i want to access from a strategy is there a way to simplify calling the parameter with say an array of the 10 parameters?

int[] array1 = {1,2,3,4,5,6,7,8,9,0}

like if i have myindicator(array1); <----tried this and it didnt work

The only way i can get this to work is myindicator(1,2,3,4,5,6,7,8,9,10); etc...each # would be a variable of some kind.

make sense?
neb1998 is offline  
Reply With Quote
Old 03-09-2011, 02:15 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 neb1998,

You can save the indicator in a variable name. Please see this recent post which explains how to do this with RSI indicator.
http://www.ninjatrader.com/support/f...32&postcount=4
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
How to create Indicator with more than 4 parameters byi777 General Programming 3 11-15-2010 10:47 AM
When indicator parameters not in Parameters category MikeInMA Strategy Development 3 11-08-2010 03:24 PM
Indicator with numerous parameters annettes Indicator Development 7 09-07-2010 03:42 AM
Indicator Accessing Indicator Where User Has Set Parameters dkrumholz Indicator Development 1 04-27-2010 02:56 PM
Indicator Parameters in a Strategy laocoon Strategy Development 1 10-08-2009 04:11 AM


All times are GMT -6. The time now is 06:48 PM.