Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Getting Chart control background color in NT8
Collapse
X
-
Getting Chart control background color in NT8
Hello, I'm trying to detect chart background color in my indicator, but NT7 method does not work in NT8 and I was not able to find it in the forum. Would you please give me a hint, how to read the color (or the brush)? I do not need to change it, I just need to read the value. Thank you.Tags: None
-
Hello mantak007, and thank you for your question.
This slightly modified excerpt from the help guide demonstrates how to access the chart's background.
http://ninjatrader.com/support/helpG...properties.htmBear in mind ChartControlProperties.ChartBackground is a Brush object. You can find publicly available MSDN documentation on Brush objects here, https://msdn.microsoft.com/en-us/lib...ing.brush.aspx .
Code:[FONT=Courier New]protected override void OnRender(ChartControl chartControl, ChartScale chartScale) { // Instantiate a ChartControlProperties object to hold a reference to chartControl.Properties ChartControlProperties myProperties = chartControl.Properties; // Show the chart background color Print("The chart background brush is " + myProperties.ChartBackground); }[/FONT]
Please let us know if there are any other ways we can help.Jessica P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
132 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
117 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
113 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
89 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment