![]() |
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 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
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); } |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please see here: http://www.ninjatrader-support.com/v...ead.php?t=3170
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Thanks - rookie mistake, in my haste I pulled my check out and didn't realize it was missing...
|
|
|
|
|
|
#4 | |
|
Junior Member
Join Date: Nov 2007
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
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 ? |
|
|
|
|
|
|
#5 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,395
Thanks: 252
Thanked 968 times in 951 posts
|
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
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#6 | |
|
Junior Member
Join Date: Nov 2007
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
I have started another thread for this... apologies for the double question / post. |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |