Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-15-2012, 03:38 PM   #1
DenMan
Member
 
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
Default Drawing Hollow Candlesticks

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?
DenMan is offline   Reply With Quote
Old 02-15-2012, 03:52 PM   #2
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 558 times in 548 posts
Default

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
http://www.ninjatrader.com/support/h...olorseries.htm

Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline   Reply With Quote
The following 2 users say thank you to NinjaTrader_Joydeep for this post:
Old 02-15-2012, 04:09 PM   #3
DenMan
Member
 
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
Default

Your solution worked great. Thanks for the simple solution!
DenMan is offline   Reply With Quote
Old 02-15-2012, 04:12 PM   #4
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 558 times in 548 posts
Default

Hello DenMan,
Glad it worked for you.
Please let me know if I can assist you any further.
NinjaTrader_Joydeep is offline   Reply With Quote
Old 02-24-2012, 08:08 AM   #5
DenMan
Member
 
Join Date: Aug 2011
Posts: 52
Thanks: 13
Thanked 0 times in 0 posts
Default Color Bars Indicator

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?
DenMan is offline   Reply With Quote
Old 02-24-2012, 08:18 AM   #6
koganam
Senior Member
 
Join Date: Feb 2008
Location: http://omegasigmaindicators.com
Posts: 6,549
Thanks: 39
Thanked 2,700 times in 2,206 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by DenMan View Post
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?
Overlay = true;

ref: http://www.ninjatrader.com/support/h...ml?overlay.htm
koganam is offline   Reply With Quote
The following user says thank you to koganam for this post:
Old 02-24-2012, 08:25 AM   #7
NinjaTrader_Joydeep
NinjaTrader Customer Service
 
NinjaTrader_Joydeep's Avatar
 
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 558 times in 548 posts
Default

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.
NinjaTrader_Joydeep is offline   Reply With Quote
Old 04-17-2016, 09:14 PM   #8
luxurious_04
Senior Member
 
Join Date: Jul 2010
Location: Philippines
Posts: 260
Thanks: 10
Thanked 8 times in 6 posts
Send a message via Skype™ to luxurious_04
Default Hollow bar of plotstyle

Is anyone here knows how to make the plotstyle bar solid to plotstyel bar hollow?
luxurious_04 is offline   Reply With Quote
Old 04-17-2016, 09:45 PM   #9
NinjaTrader_CodyB
NinjaTrader Customer Service
 
NinjaTrader_CodyB's Avatar
 
Join Date: May 2014
Posts: 942
Thanks: 4
Thanked 162 times in 154 posts
Default

Hello,
NinjaTrader_JoyDeep's example would accomplish this within by creating an indicator that uses the example:
Code:
if (Close[0] >= Open[0])
	CandleOutlineColorSeries[0] = Color.Green;
else CandleOutlineColorSeries[0] = Color.Red;
				
BarColorSeries[0] = Color.Transparent;
NinjaTrader_CodyB is offline   Reply With Quote
Old 04-17-2016, 09:59 PM   #10
luxurious_04
Senior Member
 
Join Date: Jul 2010
Location: Philippines
Posts: 260
Thanks: 10
Thanked 8 times in 6 posts
Send a message via Skype™ to luxurious_04
Default

That is not what I mean to make a hollow. I know already how to make the price bars to hollow bars. What I want is the plot style of a plot series. For example I have a dataseries name VOL so to plot the values of it is VOL.set(1023.50); and I have set the plotstyle to be a solid bar . I want to make the plotstyle of VOL to a hollow bars instead of a solid bars.
luxurious_04 is offline   Reply With Quote
Old 04-18-2016, 08:38 AM   #11
eDanny
Certified NinjaScript Consultant
 
eDanny's Avatar
 
Join Date: Jul 2008
Location: East Rochester, NY
Posts: 1,095
Thanks: 11
Thanked 109 times in 88 posts
Default

One way would be to make a custom volume indicator with two bar plots and set the first one to match the chart background color and a slightly smaller size than the second. The problem with this is that the top of the bar will have no outline.
Integrity-Traders
Great, Simple and Very Effective Indicator Addons
and NinjaScript Consulting Services.

eDanny is offline   Reply With Quote
The following user says thank you to eDanny for this post:
Old 04-18-2016, 08:40 AM   #12
luxurious_04
Senior Member
 
Join Date: Jul 2010
Location: Philippines
Posts: 260
Thanks: 10
Thanked 8 times in 6 posts
Send a message via Skype™ to luxurious_04
Default

I think that's good idea to try out. Thanks eDanny.
luxurious_04 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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 08:50 AM
Hollow Renko Bars aslane Version 7 Beta General Questions & Bug Reports 8 11-26-2009 07:56 AM
candlesticks starrynight Miscellaneous Support 2 11-24-2008 07:45 AM
Drawing Candlesticks? moflaherty General Programming 3 08-23-2007 05:23 AM


All times are GMT -6. The time now is 04:05 PM.

FULL RISK DISCLOSURE: Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

The NinjaTrader Support Forum is hosted and operated by NinjaTrader LLC (“NT”), a software development company which owns and supports the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976). The Support Forum is intended for information and educational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. Specific questions related to a brokerage account should be sent to your broker directly. Developers who offer products or other trading software tools to be used with the NinjaTrader trading platform are independent persons or companies that are in no manner affiliated with NT or NTB. Please be aware that any performance information provided by a 3rd party developer should be considered hypothetical and must contain the required additional disclosures.