Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Possibility to update Rectangle end time in a second time

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

    Possibility to update Rectangle end time in a second time

    Hello,

    I would like to know how can i update the end of a rectangle.

    For example, i define my rectangle like this
    PHP Code:
    this.draw = Draw.Rectangle(indicator, this.name, this.start, this.up_side, this.end, this.down_side, this.Global, null); 
    
    And i would like to do something like this:
    PHP Code:
    this.draw.endTime = DateTime.Now(); 
    
    Can you help me pls ?

    thanks
    johnok
    NinjaTrader Ecosystem Vendor - Trade With Me

    #2
    Hello johnok,

    The advised way is to call the draw method again, using the new information, and re-using the tag name so that the draw object is updated instead of a new object being created.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Oh ok,

      So i will remove then create a new rectangle. Thanks for the tips.

      Have a nice day
      johnok
      NinjaTrader Ecosystem Vendor - Trade With Me

      Comment


        #4
        Hello johnok,

        I have not suggested you remove the drawing object with RemoveDrawObject().

        I have suggested that you call the draw method again using the same tag name so that it updates the existing object to the new location.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Oh ok sorry, Thank you !
          johnok
          NinjaTrader Ecosystem Vendor - Trade With Me

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          612 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          355 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          561 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          564 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X