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 09-13-2011, 10:42 AM   #1
Hawk Arps
Member
 
Join Date: Oct 2008
Location: Lopez Island Washington
Posts: 47
Thanks: 32
Thanked 0 times in 0 posts
Default Data Series as input value

I am interested in creating an indicator which identifies divergences between price and oscillator. Is it possible to offer a choice of oscillators (data series) as an input value? If so, how could this be done?
Hawk Arps is offline  
Reply With Quote
Old 09-13-2011, 10:51 AM   #2
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
Default

Hello Hawk Arps,

Thank you for your post.

Yes you can create a user defined input to pick between different oscillators or input methods for your custom indicator you are creating.

Please see our Reference Sample on Creating a user-defined parameter type (enum)

http://www.ninjatrader.com/support/f...ead.php?t=3420
NinjaTrader_Matthew is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Matthew for this post:
Old 09-13-2011, 11:27 AM   #3
Hawk Arps
Member
 
Join Date: Oct 2008
Location: Lopez Island Washington
Posts: 47
Thanks: 32
Thanked 0 times in 0 posts
Default

Thank You Mathew,
Is there any way to do it without hard-coding the oscillator options, but instead allow the user to choose from whatever methods he has available in his indicator library (including proprietary ones)? Each oscillator may have different number and types of inputs // ie: Stochastics(periodD,PeriodK,Smooth) vs. Momentum(Period) .
Hawk Arps is offline  
Reply With Quote
Old 09-13-2011, 01:41 PM   #4
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,858
Thanks: 162
Thanked 579 times in 570 posts
Default

Hawk Arps,

Unfortunately it would not be possible to automatically pull the options/parameters - at least not a supported possibility. These values would need to be hard coded and switched when a particular indicator has been selected.
NinjaTrader_Matthew is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Matthew for this post:
Reply

Tags
data series, inputs, user defined methods

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
Multiple Input Series as Input martinP Indicator Development 2 01-17-2011 05:15 AM
Multiple Data Series with different Indicator Input series marotom General Programming 5 01-06-2011 12:11 PM
Retrieving price data when indicator input series is another indicator MikeInMA Indicator Development 6 01-06-2011 07:33 AM
Different Input Series for Indicators Rohok Version 7 Beta General Questions & Bug Reports 3 09-13-2010 09:57 AM
Getting user input to initialize additional data series dhunnewell Strategy Development 3 02-23-2010 01:22 PM


All times are GMT -6. The time now is 05:26 AM.