![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Senior Member
Join Date: Jun 2007
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
|
The following code won't draw the rectangle on tick charts.
protected override void OnBarUpdate() { DrawRectangle("tag1", 10, Low[10], 5, High[5], Color.PaleGreen, Color.PaleGreen, 2); } |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Please see this tip: http://www.ninjatrader-support2.com/...ead.php?t=3170
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2007
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
|
I got rectangles to draw in my indicator. I can draw a rectangle on the price pane but it's bad, I have to scale things to fit the price range. I cannot get the same code to draw a rectangle in panel2... I added the line DrawOnPricePanel =false to the initializations but nothing draws on panel2. Panel2 just sits there with a scale of 0 to 1...
I can't get it to overlay on the price either. I assume that would take care of all the scaling work...
Last edited by maxpi; 06-17-2009 at 02:21 PM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
You actually need something populating panel 2 if you want to draw in there. Please add a plot there and try again.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2007
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
|
It draws just vertical lines on panel2. They appear to be where the right and left edge of the rectangles are intended to be. They all have a height of 1 and the panel2 scale is 1. I can print the values at the time of generating the draw objects, they are not 1, ever..
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jun 2007
Posts: 151
Thanks: 0
Thanked 0 times in 0 posts
|
I added in the plot by copy /paste from another indicator. It does not show up in the indicator properties as applied to the chart.. Can I fix that or is it necessary to step through the wizard and generate a new indicator?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Draw a rectangle to group 3 bars | Winnie | Indicator Development | 1 | 03-31-2009 05:57 AM |
| Fancy Rectangle | pdavidow | Charting | 9 | 03-16-2009 09:04 AM |
| Rectangle question | 5iver | Charting | 2 | 11-01-2008 03:14 PM |
| Rectangle disappears | SteveB | Charting | 2 | 07-15-2008 08:51 AM |
| Draw tools that draw on multiple charts of the same instrument | cipher4d | Suggestions And Feedback | 3 | 04-19-2008 12:33 AM |