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 03-05-2008, 05:29 PM   #1
Kunisoft
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default DrawRectangle not working

Hello,

Can anyone explain why this very simple code does not draw a rectangle...

Thanks

#region Variables
private int name = 0;
#endregion

/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = true;
Overlay = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
name++;
DrawRectangle("Rectangle" + name.ToString(), 5, Close[5], 0, Close[0], Color.Blue, Color.BlueViolet, 1);
}
Kunisoft is offline  
Reply With Quote
Old 03-05-2008, 10:27 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please see here: http://www.ninjatrader-support.com/v...ead.php?t=3170
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-06-2008, 07:18 AM   #3
Kunisoft
Junior Member
 
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
Default

Thanks - rookie mistake, in my haste I pulled my check out and didn't realize it was missing...
Kunisoft is offline  
Reply With Quote
Old 03-02-2009, 03:33 AM   #4
Virge666
Junior Member
 
Join Date: Nov 2007
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post

I am still lost on this... I have a chart full of data and i still cannot draw a rectangle.

i just want the high of 10 bars ago and the low of the last 10 bars...

What am I missing ?
Virge666 is offline  
Reply With Quote
Old 03-02-2009, 04:37 AM   #5
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,395
Thanks: 252
Thanked 968 times in 951 posts
Default

Can you please post the code you use? Then we can take a look - meanwhile you can also take a look at this reference sample on draw objects in NinjaScript - http://www.ninjatrader-support2.com/...ead.php?t=3419
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 03-02-2009, 04:51 AM   #6
Virge666
Junior Member
 
Join Date: Nov 2007
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Can you please post the code you use? Then we can take a look - meanwhile you can also take a look at this reference sample on draw objects in NinjaScript - http://www.ninjatrader-support2.com/...ead.php?t=3419

I have started another thread for this... apologies for the double question / post.
Virge666 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
CalculateOnBarClose not working? gluebunny Indicator Development 10 04-09-2009 10:31 AM
OnMarketData() not working Json General Programming 4 11-08-2007 04:09 AM
MRO not working nybangali Strategy Development 3 08-17-2007 09:20 AM
AutoBreakeven not working jrs ATM Strategies (Discretionary Trading) 6 04-30-2007 10:15 AM
connection to I.B. not working? dave898 Connecting 2 04-18-2006 06:39 AM


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