Thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 Atticus20, Today, 07:27 AM
|
1 response
14 views
0 likes
|
Last Post
by balltrader
Today, 08:15 AM
|
||
Started by linkcou, Today, 07:01 AM
|
1 response
14 views
0 likes
|
Last Post
by balltrader
Today, 08:07 AM
|
||
Started by ninza33, Today, 07:16 AM
|
2 responses
9 views
0 likes
|
Last Post Today, 08:05 AM | ||
Started by ellington, Today, 07:40 AM
|
0 responses
8 views
0 likes
|
Last Post
by ellington
Today, 07:40 AM
|
||
Started by brunoviveiros, 02-17-2020, 05:31 AM
|
4 responses
67 views
0 likes
|
Last Post Today, 06:25 AM |
Comment