![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
|
I would like to create an indicator whose sole function is to draw hollow candlesticks that are outlined with green for up-bars, and outlined with red for down-bars. This seems so simple, yet I can’t seem to get it to work, for the bar colors set by the Data Series don’t get changed. Can you help me get on track?
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello DenMan,
Thanks for writing in and I am happy to assist you. Please try the following code Code:
if (Close[0] >= Open[0]) CandleOutlineColorSeries[0] = Color.Green; else CandleOutlineColorSeries[0] = Color.Red; BarColorSeries[0] = Color.Transparent; http://www.ninjatrader.com/support/h...olorseries.htm Please let me know if I can assist you any further.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
|
Your solution worked great. Thanks for the simple solution!
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello DenMan,
Glad it worked for you. Please let me know if I can assist you any further.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
|
One further question. When I include this indicator in my workspace, it puts it in a new panel. Is there code to always include this in the Data Series panel, or do I have to manually change that when the indicator is included?
|
|
|
|
|
|
#6 | |
|
Senior Member
|
Quote:
ref: http://www.ninjatrader.com/support/h...ml?overlay.htm |
|
|
|
|
|
The following user says thank you to koganam for this post: |
|
|
|
#7 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello,
Thanks koganam for the code snippet. DenMan you can use the code as suggested by koganam. Please let me know if I can assist you any further.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| candlesticks | playafh69 | Charting | 7 | 04-14-2010 12:56 PM |
| candlesticks | kaywai | Charting | 1 | 12-18-2009 07:50 AM |
| Hollow Renko Bars | aslane | Version 7 Beta General Questions & Bug Reports | 8 | 11-26-2009 06:56 AM |
| candlesticks | starrynight | Miscellaneous Support | 2 | 11-24-2008 06:45 AM |
| Drawing Candlesticks? | moflaherty | General Programming | 3 | 08-23-2007 05:23 AM |