ChartControl.HorizontalGridLinesPen.Color = Color.Transparent; ChartControl.VerticalGridLinesPen.Color = Color.Transparent; ChartControl.BackColor = System.Drawing.ColorTranslator.FromHtml("#000000"); ChartControl.SellColor = Color.Orange;
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
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:
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.,JesseNinjaTrader Customer Service
-
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.JesseNinjaTrader Customer Service
Comment
-
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:
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by alifarahani, Today, 09:40 AM
|
6 responses
29 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
17 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
13 views
0 likes
|
Last Post Today, 02:56 PM | ||
Started by Waxavi, Today, 02:00 AM
|
1 response
12 views
0 likes
|
Last Post Today, 02:53 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
17 views
0 likes
|
Last Post Today, 02:41 PM |
Comment