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 CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
172 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
88 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
129 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
208 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
185 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment