Add(new Plot(new Pen(Color.DodgerBlue,3), PlotStyle.Bar, "Filter04"));
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
Plot color
Collapse
X
-
Plot color
Below is an "Add Plot" statement in Initialize() section. Within the OnBarUpdate() section, I want to access the color of this plot (either the default or a user override). How can I do this? tx!
Add(new Plot(new Pen(Color.DodgerBlue,3), PlotStyle.Bar, "Filter04"));Tags: None
-
Hello pman777,
Thanks for opening the thread.
For accessing the color of the Plot, you can use the PlotColors collection or you can reference the Pen of the Plot in the Plots collection.
The help documentation on PlotColors and Plots describes how you can dynamically change the color for both.
Plots - https://ninjatrader.com/support/help.../nt7/plots.htm
PlotColors - https://ninjatrader.com/support/help...plotcolors.htm
If you would like to make a user defined color, you will have to serialize the Color so it can be properly saved in XML format (to save settings when being used.) We have an example that describes the process below.
User defined Colors - http://ninjatrader.com/support/forum...ead.php?t=4977
Please let me know if I may be of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
26 views
0 likes
|
Last Post
by wzgy0920
Today, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Today, 10:33 PM
|
||
Started by wzgy0920, Yesterday, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Today, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
192 views
0 likes
|
Last Post
by Hasadafa
Today, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Today, 08:07 PM |
Comment