I'm trying to recreate a paint bar type of indicator. I use to just set the BarColor property. What is the equivalent in NT8?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Equivalent of BarColor
Collapse
X
-
Equivalent of BarColor
Hi,
I'm trying to recreate a paint bar type of indicator. I use to just set the BarColor property. What is the equivalent in NT8?Tags: None
-
Thanks Matt,
One more question, I use to set a plots opacity by defining the color using:
Color.FromArgb(Math.Min(255, Math.Max(0, Convert.ToInt32(opacity * 0.01 * 255))), color)
I tried setting the opacity by:
Plots[0].Brush.Opacity = 0.5d;
but it didn't like that. Could you point me in the right direction?
Comment
-
The Plots brush is frozen when it is instantiated , which means it's read-only and cannot be modified at runtime.
If you wish to change a plot's brush property, you need to first clone the desired plot brush, make the changes, and then make sure you call Freeze() on that new brush to prevent further access issues
Attached is a complete example of how to change the opacity of entire plot series.Code:Brush myBrush = Plots[0].Brush.Clone(); myBrush.Opacity = 0.5f; myBrush.Freeze(); Plots[0].Brush = myBrush;
Attached FilesMatthewNinjaTrader Product Management
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, Today, 06:46 AM
|
0 responses
9 views
0 likes
|
Last Post
by Mindset
Today, 06:46 AM
|
||
|
Started by M4ndoo, Yesterday, 05:21 PM
|
0 responses
14 views
0 likes
|
Last Post
by M4ndoo
Yesterday, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
15 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
82 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
48 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment