Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing paremeters of an IRay object

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

    Changing paremeters of an IRay object

    Hi,

    Is it possible to change the Tag and EndTime of a certain IRay object?

    If not, is it possible to get all properties of the IRay, and recreate another one with different Tag and EndTime, but rest of the properties the same?

    Thanks a lot for any help.

    #2
    Originally posted by zaza5000 View Post
    Hi,

    Is it possible to change the Tag and EndTime of a certain IRay object?

    If not, is it possible to get all properties of the IRay, and recreate another one with different Tag and EndTime, but rest of the properties the same?

    Thanks a lot for any help.
    For any DrawObject, if you want to later access the properties, make sure that you assign the DrawObject an identity when you create it.

    Code:
    private iDrawObject = drawobject;
    
    drawobject = DrawObjectType(signature)
    After that you can use dot notation to change any of the properties.

    Code:
    drawobject.propery = newValue;

    Comment


      #3
      Is there a way to systematically create variables?
      For example within a loop i: 1 to 20
      drawobject1, drawobject2.... drawobject20 would be used as the new variable name?

      Or is there a way of calling an IRay object through its tag? I think the tag is always unique right?

      Because I don't have a specific amount of IRay's in my code, they're drawn and erased at certain times within the code, but there is no limit to how many of them there will be...

      I just want to add a certain property to the code that will change the endtime of certain rays in some situations...
      Last edited by zaza5000; 03-20-2011, 07:20 PM.

      Comment


        #4
        Originally posted by zaza5000 View Post
        Is there a way to systematically create variables?
        For example within a loop i: 1 to 20
        drawobject1, drawobject2.... drawobject20 would be used as the new variable name?

        Or is there a way of calling an IRay object through its tag? I think the tag is always unique right?

        Because I don't have a specific amount of IRay's in my code, they're drawn and erased at certain times within the code, but there is no limit to how many of them there will be...

        I just want to add a certain property to the code that will change the endtime of certain rays in some situations...
        You seem to be saying that you will be creating an initially unknown number of drawobjects, and then may want to modify them. In that case, I think your only option would be to iterate through the drawobjects collection and modify what you seek.

        ref: http://www.ninjatrader.com/support/h...rawobjects.htm

        Comment


          #5
          Thanks a lot, that is exactly what I was looking for.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          572 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          331 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
          549 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          550 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X