![]() |
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
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I'd like to know if it is possible to programaticly determine the "background" color of an indicator display (at the bottom of the screen under the price chart)? For example if something like this is possible: if(Indicator.BackColor == Green){do something;} Thanks in advance for any help. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
- an indicator has no "background" color
- you can access the color of a plot e.g. by "Plots[0].Pen.Color"
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Hi Burga1,
You can paint the indicator panel a certain color though. Please take a look at these two links: BackColor BackColorAll
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
Thanks for the replies...yes that's what I mean--if an indicator has had the command for "backcolor" executed to change the color...can this be subsequently "read" as per my example in my first post? I simply want to be able to program a strategy to "read" what the indicator backcolor is... |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Yes, it can be accessed as per Josh's post below
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you, so you're saying that this:
if(Indicator.BackColor == Green){do something;} is acceptable code? |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
No. Just do this:
Code:
if (BackColor == Color.Green)
// Do something
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks for the reply. If I'm writing a strategy to access the backcolor within a seperate indicator, is that not possible? Would I have to write the code that sets the backcolor within the strategy then?
|
|
|
|
|
|
#9 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Not sure I follow, but maybe you could just expose a property from your indicator that contains values pertaining to the conditions you are searching for and then access those from the strategy.
Here is a reference sample for doing just that: http://www.ninjatrader-support.com/v...ead.php?t=4991
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Nov 2007
Posts: 388
Thanks: 0
Thanked 0 times in 0 posts
|
Thank you.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DOM Background Color | fredjone | Suggestions And Feedback | 3 | 02-26-2009 04:06 AM |
| Background Color | BradB | Indicator Development | 26 | 11-18-2008 10:57 AM |
| Data Box background color | zq655 | Charting | 1 | 01-28-2008 08:12 AM |
| Change background color | trader2be | Indicator Development | 1 | 11-13-2007 09:13 PM |
| Chart Background Color | NinjaTrader_Josh | General Programming | 1 | 07-15-2007 03:36 PM |