Add(new Plot(new Pen(Color.DodgerBlue,3), PlotStyle.Bar, "Filter04"));
Announcement
Collapse
No announcement yet.
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.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
580 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
336 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
102 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment