ChartControl.HorizontalGridLinesPen.Color = Color.Transparent;
ChartControl.VerticalGridLinesPen.Color = Color.Transparent;
ChartControl.BackColor = System.Drawing.ColorTranslator.FromHtml("#000000");
ChartControl.SellColor = Color.Orange;
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to set ChartControl colors including grid lines
Collapse
X
-
How to set ChartControl colors including grid lines
In NinjaTrader 7 I used the following (hidden) params for ChartControl:
Are there equivalent params in NinjaTrader 8?Code:Tags: None
-
Hello,
Thank you for the post.
The ChartControl is now documented and the Properties are also exposed for use. You can find these items in the following page:
For the properties you are using, it looks like the following items would take their places:
GridLineHPen
GridLineVPen
ChartBackground
For the ChartTrader, this is not currently exposed for a Property object, but you may be able to access this using a similar approach to the following post: https://ww.ninjatrader.com/support/f...44&postcount=7
I look forward to being of further assistance.,
-
Hello,
The SellColor is the later part of my prior reply, you may be able to change the color using the user interface per the post I had linked but there are currently no examples of this. Right now there is no exposed properties object for the chart trader specifically so items in the chart trader would need to be accessed like in the provided post. This is likely an item you would need to use manual programming to both locate the control and change its color.
For the session break line, please see the ChartBars.Properties object. This is part of the greater Chart documentation, I would suggest reviewing this whole section to see items you may have previously used in NT7's ChartControl.
I look forward to being of further assistance.
Comment
-
Well, that's what I am trying to do. I am attempting to programmatically locate the control and change its color. The links you sent me don't seem to have anything to do with that.Originally posted by NinjaTrader_Jesse View PostThe SellColor is the later part of my prior reply, you may be able to change the color using the user interface per the post I had linked but there are currently no examples of this. Right now there is no exposed properties object for the chart trader specifically so items in the chart trader would need to be accessed like in the provided post. This is likely an item you would need to use manual programming to both locate the control and change its color.
Comment
-
Hello,
Thank you for the reply.
The second link in post 2 is related to your question. I noted that you would have to access the chart trader control by its instance because there is no exposed properties object for it. I have added a feature request to have this exposed. The linked forum post shows how to do this, the following syntax would get the chart trader control:
There is more information in the linked post on how to use this type of syntax and also how to find other controls.Code:chartTrader = Window.GetWindow(ChartControl.Parent).FindFirst("ChartWindowChartTraderControl") as ChartTrader;
You would need to explore the ChartTrader control to change items using the techniques listed in the other post. NT8 uses WPF, so you can use standard WPF syntax to change colors of controls or do other actions programmatically. There is not currently a sample of getting specifically the sell button, so this is an item you could use the information on that page to locate if you would like to.
Please let me know if I may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment