Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 bortz, 11-06-2023, 08:04 AM
|
47 responses
1,602 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
8 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
4 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
12 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment