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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        149 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        84 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        129 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        125 views
        1 like
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        102 views
        0 likes
        Last Post CarlTrading  
        Working...
        X