![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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...
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2008
Posts: 71
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks for the pointer.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Painting indicators under candles | barabba | Charting | 2 | 01-18-2008 07:02 AM |