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 cmoran13, 04-16-2026, 01:02 PM
|
0 responses
42 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
25 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
162 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
98 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
157 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment