Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AaronKoRn, Today, 09:49 PM
        0 responses
        11 views
        0 likes
        Last Post AaronKoRn  
        Started by carnitron, Today, 08:42 PM
        0 responses
        10 views
        0 likes
        Last Post carnitron  
        Started by strategist007, Today, 07:51 PM
        0 responses
        11 views
        0 likes
        Last Post strategist007  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        44 responses
        3,980 views
        3 likes
        Last Post jhudas88  
        Started by rbeckmann05, Today, 06:48 PM
        0 responses
        9 views
        0 likes
        Last Post rbeckmann05  
        Working...
        X