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 05-16-2009, 01:30 AM   #1
stormze
Member
 
Join Date: Oct 2008
Posts: 53
Thanks: 0
Thanked 0 times in 0 posts
Default Drawing rectangle not working

Hi, I want to know why this code doesnt work, I tryed a single DrawRectangle on BarUpdate and it displays correctly, but not like this
Attached Files
File Type: cs ESPivots.cs (5.2 KB, 13 views)
stormze is offline  
Reply With Quote
Old 05-16-2009, 09:26 AM   #2
roonius
Certified NinjaScript Consultant
 
Join Date: Oct 2008
Location: Chicago, IL
Posts: 523
Thanks: 0
Thanked 3 times in 3 posts
Send a message via Skype™ to roonius
Default

Quote:
Originally Posted by stormze View Post
Hi, I want to know why this code doesnt work, I tryed a single DrawRectangle on BarUpdate and it displays correctly, but not like this
I don't see any pivots added to be drawn.
roonius is offline  
Reply With Quote
Old 05-16-2009, 12:19 PM   #3
stormze
Member
 
Join Date: Oct 2008
Posts: 53
Thanks: 0
Thanked 0 times in 0 posts
Default

I added a PivotRange object to the list on Initialize...

Code:
Pivots.Add(new PivotRange(880));
stormze is offline  
Reply With Quote
Old 05-16-2009, 12:44 PM   #4
stormze
Member
 
Join Date: Oct 2008
Posts: 53
Thanks: 0
Thanked 0 times in 0 posts
Default

Ok apparently double.NaN was the problem, I tryied not using it and check for Y2 < 0 and it worked.... very weird
stormze 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
rectangle Opacity Property mikeytrader General Programming 1 05-09-2009 02:08 PM
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
Rectangle Equivalent of a Ray daven Suggestions And Feedback 3 06-29-2007 09:36 AM


All times are GMT -6. The time now is 05:10 AM.