Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can this be done?

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

    #16
    coolmoss, you would use the .StartY property of your IRectangle object then :

    Comment


      #17
      all rectangles extend

      Originally posted by NinjaTrader_Bertrand View Post
      coolmoss, you would use the .StartY property of your IRectangle object then :

      http://www.ninjatrader.com/support/h...irectangle.htm
      Thanks Bertrand, here's the code I've been trying...

      Code:
      if (draw.Tag.Contains("myRec"))
      				{
      					IRectangle Extend = (IRectangle) draw;
      					Print(Extend.StartY);
      					if (Extend.StartY>High[1])
      					{
      						Extend.EndBarsAgo = 0;
      					}
      				}
      This code causes ALL the rectangles to extend far right. I just want the rectangles with a StartY value greater than the current bar's high to extend right.

      If I comment out the above code, the correct rectangles plot. Also, I have the print statement to determine if the StartY values are what I'm expecting, and they are.

      I'm guessing my ignorance is causing a stupid error of some sort.

      Comment


        #18
        For this would trigger on all rectangles, you don't check for any specific ones just the ones containing the myRec tag - while infact your create multiple ones by adding those with a unique tag per your condition posted lower.

        Comment


          #19
          Originally posted by NinjaTrader_Bertrand View Post
          For this would trigger on all rectangles, you don't check for any specific ones just the ones containing the myRec tag - while infact your create multiple ones by adding those with a unique tag per your condition posted lower.
          I thought I was checking for specific ones with this line:

          if (Extend.StartY>=High[0])

          Comment


            #20
            Can you please send us the script you're working with to support at ninjatrader dot com so we could give it a run for you?

            Thanks,

            Comment


              #21
              Will send right away, thanks.

              Comment


                #22
                coolmoss,

                We have received your script, Ill correspond with you via email from now on.
                Adam P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                574 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                332 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X