PDA

View Full Version : Background Color


rtj4201
03-15-2009, 02:52 PM
If I want the chart background color to be green when inidcator is a buy and red when the indicator is a sell, what code do I use to color the chart background?

NinjaTrader_Ray
03-15-2009, 07:12 PM
You would need to write a custom indicator and use the following BackColor property.

http://www.ninjatrader-support.com/HelpGuideV6/BackColor.html

roonius
03-15-2009, 07:44 PM
If I want the chart background color to be green when inidcator is a buy and red when the indicator is a sell, what code do I use to color the chart background?

BackColor = Color.Red;

rtj4201
03-15-2009, 08:00 PM
Will it do that for the price chart background, not panel 2?

roonius
03-15-2009, 08:02 PM
Will it do that for the price chart background, not panel 2?
If your indie overlays the price panel then it will change price chart background, otherwise panel 2 (or whatever panel your indie sits in)

rtj4201
03-15-2009, 08:07 PM
What does indie mean?

roonius
03-15-2009, 08:08 PM
What does indie mean?

Indicator :) Sorry

rtj4201
03-15-2009, 08:30 PM
I have up down arrows plotting on the price chart based on the indicator in panel 2; however, the arrows are small and hard to see. I was wondering if I could have the price chart change color green/red based on the buy sell signal from panel 2.

roonius
03-15-2009, 08:39 PM
I have up down arrows plotting on the price chart based on the indicator in panel 2; however, the arrows are small and hard to see. I was wondering if I could have the price chart change color green/red based on the buy sell signal from panel 2.

I am not aware of a built-in method for that. You would need to do some kind of workaround...
May be to make a different indicator which does same calculations, but does not plot anything, just changes background color. In that case you could overlay it on the price...

rtj4201
03-15-2009, 09:17 PM
How would I overlay it on the price?

roonius
03-15-2009, 09:35 PM
How would I overlay it on the price?

In initialize():

Overlay = true;

Or in indicator properties set panel to 1