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 trilliantrader, Today, 08:16 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bill2023, Yesterday, 08:51 AM
        3 responses
        20 views
        0 likes
        Last Post bltdavid  
        Started by yertle, Today, 08:38 AM
        0 responses
        4 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by Mestor, 03-10-2023, 01:50 AM
        15 responses
        378 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by samish18, Yesterday, 08:57 AM
        10 responses
        28 views
        0 likes
        Last Post samish18  
        Working...
        X