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 Stanfillirenfro, Yesterday, 09:19 AM
|
7 responses
51 views
0 likes
|
Last Post Today, 05:31 AM | ||
Started by TraderCro, 04-12-2024, 11:36 AM
|
4 responses
69 views
0 likes
|
Last Post
by Mindset
Today, 05:29 AM
|
||
Started by Mindset, Yesterday, 02:04 AM
|
1 response
15 views
0 likes
|
Last Post
by Mindset
Today, 05:26 AM
|
||
Started by agclub, 04-21-2024, 08:57 PM
|
4 responses
18 views
0 likes
|
Last Post Today, 05:14 AM | ||
Started by Irukandji, Today, 04:58 AM
|
0 responses
6 views
0 likes
|
Last Post
by Irukandji
Today, 04:58 AM
|
Comment