Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Full/Solid Bars vs Empty Bars
Collapse
X
-
Full/Solid Bars vs Empty Bars
I'd like to set bars as filled-in/solid and others as empty. I'm using NT 6.5 .. What is the API for this? I see Barcolor, but how can I control fill-type in my ninjascript indicator?
ThanksTags: None
-
What I want to do is have some green outline bars (no fill), some green filled bars, some red outline bars, and some red fill bars.
-
Hello Shortorlong,
This should be possible, as long as you define the conditions for all the different color combinations you're after.
BarColor applies to the fill color. Version 7 recently introduces CandleOutlineColor as a new property you can set.
You'd define your conditions, and then assign BarColor and CandleOutline within. If you want empty bars, you can assign color transparent.
if (someCondition)
{
BarColor = Color.Green;
CandleOutlineColor = Color.Green;
}
if (anotherCondition)
{
BarColor = Color.Transparent;
CandleOutlineColor = Color.Green;
}Ryan M.NinjaTrader Customer Service
Comment
-
-
Yeah, unfortunately setting Color to transparent or white in 6.5 colors the wicks as well. So the whole bar is completely transparent / invisible / 'missing'.
It's interesting because on chart properties i can set 'up bar color' to white, and have the outline as black, and achieve the effect, but I can't control it in an indicator, hm.
Comment
-
Yes, this is true. Unfortunately may need to move to 7 to program this. This information is available in chart properties but no supported way of defining up / down colors.
As a hint - look at the code for HeikenAshi indicator. Although unsupported, there are some chart control properties that may help you out.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by sjsj2732, 03-23-2026, 04:31 AM
|
0 responses
42 views
0 likes
|
Last Post
by sjsj2732
03-23-2026, 04:31 AM
|
||
|
Started by NullPointStrategies, 03-13-2026, 05:17 AM
|
0 responses
294 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
290 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
135 views
1 like
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
98 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|

Comment