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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
169 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
324 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
250 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
353 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
180 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment