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 07-25-2009, 04:29 PM   #1
taotree
Junior Member
 
Join Date: May 2008
Posts: 28
Thanks: 1
Thanked 0 times in 0 posts
Default Access attributes of another indicator

Let's say I have 2 existing indicators: A, B. I want to create another indicator X that includes information from A and B. Without changing A and B at all, how can I access all the information about A and B?

I found this:

IndicatorA(Param1, Param2, etc.).Value[0]

worked to get me the value of one of them. But how do I get the color (the color changes over time in this indicator)?

Also, one of them is a paintbar, so I want to get the color of that, too.

Thanks!
taotree is offline  
Reply With Quote
Old 07-25-2009, 07:00 PM   #2
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

Quote:
Originally Posted by taotree View Post
Let's say I have 2 existing indicators: A, B. I want to create another indicator X that includes information from A and B. Without changing A and B at all, how can I access all the information about A and B?

I found this:

IndicatorA(Param1, Param2, etc.).Value[0]

worked to get me the value of one of them. But how do I get the color (the color changes over time in this indicator)?

Also, one of them is a paintbar, so I want to get the color of that, too.

Thanks!
You will need to expose values that represent the color states of your paint bar. The following reference sample will be of help.

http://www.ninjatrader-support2.com/...ead.php?t=4991
NinjaTrader_Ray is offline  
Reply With Quote
Old 07-25-2009, 07:06 PM   #3
taotree
Junior Member
 
Join Date: May 2008
Posts: 28
Thanks: 1
Thanked 0 times in 0 posts
Default

If I understand your answer correctly, it doesn't satisfy my question. I said, without changing indicator A or B. Are you saying that there is no way to find out the color of a plot in another indicator?
taotree is offline  
Reply With Quote
Old 07-26-2009, 08:55 AM   #4
roonius
Certified NinjaScript Consultant
 
Join Date: Oct 2008
Location: Chicago, IL
Posts: 523
Thanks: 0
Thanked 3 times in 3 posts
Send a message via Skype™ to roonius
Default

Quote:
Originally Posted by taotree View Post
If I understand your answer correctly, it doesn't satisfy my question. I said, without changing indicator A or B. Are you saying that there is no way to find out the color of a plot in another indicator?
Color of a plot does not change.
You can access it (if it is regular plot)

Color mycolor = IndicatorA().Plots[0].Pen.Color;
roonius is offline  
Reply With Quote
Old 08-06-2009, 06:25 PM   #5
saturntd
Junior Member
 
Join Date: May 2009
Posts: 26
Thanks: 0
Thanked 1 time in 1 post
Default How to access current plot color

I have a 3rd party indicator which plots a line. The line can be one of 3 colors. I want to be able to access the current color in a strategy. Is there any way to do this? I can't see that they've exposed any public property to indicate the current color.
saturntd is offline  
Reply With Quote
Old 08-07-2009, 03:55 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,397
Thanks: 252
Thanked 968 times in 951 posts
Default

saturntd, welcome to our forums! Can you access the third party indicator code? Then it would be easiest to work with the conditions leading to the line color changes...
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 08-07-2009, 04:26 AM   #7
saturntd
Junior Member
 
Join Date: May 2009
Posts: 26
Thanks: 0
Thanked 1 time in 1 post
Default

Bertrand thanks for the response. I can't access their code it's proprietary.
saturntd is offline  
Reply With Quote
Old 08-07-2009, 04:29 AM   #8
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,397
Thanks: 252
Thanked 968 times in 951 posts
Default

Then you should contact them and ask to add exposed indicator / signal states to their next revision if possible.
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
Access to .dll indicator ct Indicator Development 16 07-15-2010 11:31 AM
Indicator Attributes for Strategy Question Faspomy Strategy Development 6 10-03-2008 12:39 PM
Access to same indicator with different periods snaphook General Programming 1 09-08-2008 06:54 AM
Conditioner Builder Indicator Access lpart Strategy Development 7 10-06-2007 03:45 PM
DOM access within indicator RedDuke Indicator Development 6 09-25-2007 10:24 AM


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