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
Change "Color for up bars" in indicator
Collapse
X
-
Change "Color for up bars" in indicator
I have an indicator that changes BarColor based on certain criteria, and it works fine. I want to use Line on Close for Bar type, when I do, BarColor has no effect on that color. How can I access the "Color for up bars" (which does change the color) property to change the color in the indicator. I've searched the Ninja Script reference and did a search of the forums, with no luck. But, I could have missed it. Anyone know?Tags: None
-
Hi ghoti,
Unfortunately, that is outside of the scope of support I can offer. Hopefully someone here will be able to provide some hints.
As a workaround, you could simply create a plot connecting the close prices, then color the plot as you see fit from your code.Last edited by NinjaTrader_Tim; 07-29-2010, 01:34 PM.TimNinjaTrader Customer Service
-
If you want to set the color of something in your indicator to the same color as the Up or Down color of the price bar, use the ChartControl properties. ie: ChartControl.UpColor
The following snippet lets you access the colors set by "Color for down bars" & "Color for up bars"
Code:[FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff][FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2] (UsePriceColors) {[/SIZE][/FONT] [SIZE=2][FONT=Courier New] colorVolUp = ChartControl.UpColor;[/FONT][/SIZE] [SIZE=2][FONT=Courier New] colorVolDown = ChartControl.DownColor;[/FONT][/SIZE] [SIZE=2][FONT=Courier New]}[/FONT][/SIZE] [/SIZE][/FONT]
enjoyLast edited by David Lean; 05-13-2011, 06:32 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
Comment