Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawRectangle not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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);
    }

    #2
    Please see here: http://www.ninjatrader-support.com/v...ead.php?t=3170

    Comment


      #3
      Thanks - rookie mistake, in my haste I pulled my check out and didn't realize it was missing...

      Comment


        #4
        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 ?

        Comment


          #5
          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

          Comment


            #6
            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.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            580 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            336 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            102 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X