NinjaTrader Support Forum  
X

Attention!

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


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 02-17-2008, 01:25 PM   #1
Kunisoft
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default Multiple Instrument Indicator

Hello,

New to NT. I am trying to build a multiple Instrument Indicator (e.g all stocks in the dow). This indicator will use all 30 stocks to create a single result. I thought the BarsArray collection would help so I have tried to use the Add() function. Unfortunately, in an indicator, you use the IndicatorBase Add(). BarsArray uses the StrategyBase Add(). I haven't been able to successfully use a StrategyBase Add() function in an Indicator.

So... I am a little stuck now. Am I going down the correct path (using BarsArray) or is there other functionality available?

Thanks...
Paul
Kunisoft is offline  
Reply With Quote
Old 02-17-2008, 10:30 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Indicators do not support multi instruments at this time. Only strategies do.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-12-2008, 07:15 AM   #3
Futures_Shark
Member
 
Join Date: Dec 2006
Location: , ,
Posts: 79
Thanks: 0
Thanked 0 times in 0 posts
Default

From inside a strategy can you plot an indicator based on the prices of multiple instruments?
Futures_Shark is offline  
Reply With Quote
Old 03-12-2008, 07:24 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Unfortunately this is not supported.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-12-2008, 11:09 AM   #5
Wessel
Member
 
Join Date: Jul 2007
Location: Maarn, Netherlands
Posts: 94
Thanks: 0
Thanked 3 times in 2 posts
Send a message via MSN to Wessel
Default

Any plans for this?
Think you will be the first in the market. This is where all the TA programs bail out.

Why is this interesting? Well if you could devide the large cap's by the small caps index it gives you a good indication whenever to trade large caps or small caps.

However I would be able to read additional Yahoo data if I program a Yahoo data get into C#. That would give me the ability to have the NT quotes and my own external data source for the second instrument or index?

Is this assumtion correct?

Wessel

Quote:
Originally Posted by NinjaTrader_Dierk View Post
Unfortunately this is not supported.
Wessel is offline  
Reply With Quote
Old 03-12-2008, 11:56 AM   #6
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

NT7 (beta end of this year) will support multi series indicators.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-15-2008, 07:35 AM   #7
darthtrader
Member
 
Join Date: Oct 2007
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post
NT7 (beta end of this year) will support multi series indicators.
Thats fantastic Dierk. Can I just suggest to PLEASE do something that we will be able to use this to also simply plot 2 different instruments on the same chart. I don't really understand how we got to this point with retail software with it being virtually easier to plot the cylces of the moon than to plot 2 instruments and then do simple correlations.
darthtrader is offline  
Reply With Quote
Old 03-15-2008, 09:05 AM   #8
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

NT7 will also support multi-series on a chart.
NinjaTrader_Ray is offline  
Reply With Quote
Old 03-22-2008, 12:21 PM   #9
Elliott Wave
Senior Member
 
Join Date: Mar 2008
Posts: 731
Thanks: 0
Thanked 1 time in 1 post
Default

I'm really looking forward to this. There are a lot of uses I can think of, specifically with commodity spot prices and ETFs.

For example, assuming the spot price of gold or oil changes slightly quicker than corressponding ETFs such as GLD or USO it would be useful to trade the ETF using indicators on the spot price, potentially giving a time advantage over other traders...

Another example would be trading gold ETFs using a strategy that incorporates indicators from the USDX etc.

Something like [instrument name].[indicator name].parameter that could be accessed as global variables in NinjaScript would be extremely useful!

Elliott Wave is offline  
Reply With Quote
Old 03-22-2008, 02:00 PM   #10
darthtrader
Member
 
Join Date: Oct 2007
Posts: 51
Thanks: 0
Thanked 0 times in 0 posts
Default

This is fantastic news. Might even be able to make your own versions of NYSE TICK like neoticker then.
This should really put a nail in the coffin of the competition.
Hats off to you guys for laying the groundwork for an unbeatable product and having some long term vision unlike basically every other piece of software I've tried.
darthtrader is offline  
Reply With Quote
Old 04-14-2010, 07:22 AM   #11
vt2009
Junior Member
 
Join Date: Mar 2010
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default Plotting Second Instrument

Is there any examples of simple NT7 code that would plot a second instrument in a new panel on my chart.
vt2009 is offline  
Reply With Quote
Old 04-14-2010, 08:19 AM   #12
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

I wanted to let you know that we recieved your note and will be assisting shortly.

Thank you for your patience.
NinjaTrader_Brett is offline  
Reply With Quote
Old 04-14-2010, 09:06 AM   #13
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

vt2009, you could check into for example the pairs indicator Tim shared on our forums -

http://www.ninjatrader-support2.com/...splay.php?f=37

The code however does not plot the added instrument, it just becomes accessible for calculations internally in the code.

If you want to plot this indicator on a MultiSeries chart, you need to create the chart with all your desired series and then for example apply the indicator to your primary chart series.
NinjaTrader_Bertrand is online now  
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
Accessing Multiple Custom Indicator Plots within a Strategy whitmark Strategy Development 15 03-28-2009 04:21 PM
Confusion on Event Driven OnBarUpdate Mechanism for Multiple Instrument Strategy shliang Strategy Development 6 01-29-2008 05:04 AM
MRO in indicator with multiple plots Jim-Boulder General Programming 2 01-10-2008 11:34 AM
Multiple Connections - Choosing which instrument uses which connection Big D Miscellaneous Support 1 03-14-2007 07:48 PM
Multiple Strategies on same instrument TraderTony Miscellaneous Support 10 03-10-2006 01:03 AM


All times are GMT -6. The time now is 12:27 AM.