|01-27-2008, 04:33 PM||#1|
Join Date: Jan 2008
Thanked 0 times in 0 posts
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.
|01-27-2008, 04:51 PM||#2|
Join Date: Nov 2004
Location: Denver, CO, USA
Thanked 45 times in 32 posts
Off the top of my head, you likely will want to use the DrawVerticalLine() method.
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 Customer Service
|Thread||Thread Starter||Forum||Replies||Last Post|
|Painting indicators under candles||barabba||Charting||2||01-18-2008 07:02 AM|