if(someBool)
{
PlotBrushes[0][0] = BarBrush;
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Color Plot same as candlestick color
Collapse
X
-
Hello swcooke,
Thanks for your post.
You can use BarBrush like you are doing if you are specifically setting the BarBrush somewhere else in your code. Otherwise, I believe something similar to the following snippet may be the easiest way to go about this.
Please see the following link for more information on UpBrush and DownBrush:Code:protected override void OnBarUpdate() { Brush upBrush = ChartBars.Properties.ChartStyle.UpBrush; Brush downBrush = ChartBars.Properties.ChartStyle.DownBrush; PlotBrushes[0][0] = Close[0]>=Open[0] ? upBrush : downBrush; }
Josh G.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
35 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
19 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
21 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment