Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Object Tags

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

    Object Tags

    Hi,

    I really like using object tags with Time in indicators to get them to stay put

    Code:
    DrawRay ("Tag" + Time,   ...
    and just using a string tag to get them to be replaced...

    Code:
    DrawRay ("Tag",   ...

    but if I want it to "ghost", say show 2 or three instances and then be replaced, how would I do that?

    You know, have Ray1, Ray2, Ray3 but when Ray4 comes up, Ray1 disappears and so on, always only having 3 rays on the screen at a time.

    just like "Tag", means Ray1, Ray1, Ray1, Ray1 - always replaced by the next instance

    but I want to be able to select the number of instances I see before they get replaced.

    Any ideas?

    #2
    stockgoblin, I think you would want to use 3 different unique tags and keep track in your code how many objects are 'in play' so you could then recycle Ray1 as Ray4 would be created by your conditions.

    Comment


      #3
      What is the standard way of keeping track of what objects are in play?

      I have a loop, when the condition is met a line is drawn. The condition is met a lot so I'd like there to be only 3 or 4 lines drawn before they become replaced. Can I limit the number of objects based upon the tag?

      Comment


        #4
        stockgoblin, you could be running a custom counter each time your conditions hit and would generate an object or you would access the DrawObjects collection directly from your script - http://www.ninjatrader.com/support/h...ub=DrawObjects

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, Yesterday, 04:31 AM
        0 responses
        31 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        286 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        283 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        133 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        91 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X