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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
593 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
554 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment