NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 01-27-2008, 04:33 PM   #1
jjthetrader
Member
 
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Default Help Painting in Bar

Hey Guys, I'm new to Ninja so please excuse me if this is a newbie question. I've switched over from TradeStation where I was used to easylanguage so I'm just getting aquainted with ninjascripts.

Please see the attached photo for what I am looking for interms of coding help.

As you can see I've managed to get my indicator to plot the high and the low of the calculated formula. The white dot is the high and the red is the low. But what I'd like to see is a line (a bar) that is similar to price's OHLC bar, one that's pained in solid in the entire range. I'd also like to add a Close to this bar if possible.
Is this possible in Ninja?
Here's what I've got to plot the High:
Add(new Plot(Color.FromKnownColor(KnownColor.White), PlotStyle.Dot, "Hi"));

And then Hi.set to finish it off.

Any help would be appreciated.
Thanks
JJ
Attached Images
File Type: jpg Vcharts (Large).jpg (79.5 KB, 38 views)
jjthetrader is offline  
Reply With Quote
Old 01-27-2008, 04:51 PM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Off the top of my head, you likely will want to use the DrawVerticalLine() method.

http://www.ninjatrader-support.com/H...ticalLine.html

You could play around with other drawing methods to try and get some marker for the close price. If you plan on have individual lines for each bar, keep in mind that managing many draw objects can become performance intensive. You may consider limiting how many lines are drawn such as --> Only draw lines on the last 200 bars etc...
NinjaTrader_Ray is offline  
Reply With Quote
Old 01-28-2008, 06:23 AM   #3
jjthetrader
Member
 
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks for the pointer.
jjthetrader 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
Painting indicators under candles barabba Charting 2 01-18-2008 07:02 AM


All times are GMT -6. The time now is 08:44 AM.