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