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
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 | ||
---|---|---|---|---|
Net Change
by Segwin
Started by Segwin, 05-07-2018, 02:15 PM
|
14 responses
1,789 views
0 likes
|
Last Post
by aligator
Today, 11:47 AM
|
||
Started by Jimmyk, 01-26-2018, 05:19 AM
|
6 responses
837 views
0 likes
|
Last Post
by emuns
Today, 11:27 AM
|
||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
6 responses
3,294 views
1 like
|
Last Post
by jgualdronc
Today, 10:56 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
13 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
11 responses
63 views
0 likes
|
Last Post Today, 10:08 AM |
Comment