Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
          BertrandNinjaTrader Customer Service

          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 wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            26 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            32 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, Yesterday, 09:53 PM
            2 responses
            49 views
            0 likes
            Last Post wzgy0920  
            Started by Kensonprib, 04-28-2021, 10:11 AM
            5 responses
            192 views
            0 likes
            Last Post Hasadafa  
            Started by GussJ, 03-04-2020, 03:11 PM
            11 responses
            3,234 views
            0 likes
            Last Post xiinteractive  
            Working...
            X