Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reading tags from the Drawing Objects

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

    Reading tags from the Drawing Objects

    I want to create a strategy that can read the DrawingObjects text or arrows and be used to enter or exit a trade.
    For example - If the DrawingObject has a tag 'GoingUp111', the strategy would read this tag and enter a long condition untll there is a another tag 'GoingDown242' or a target. Of course the numbers would be ignored.
    It could also be that I really don't want to enter a trade based on the tag, but filter the strategy based on a tag.
    For example - I have MA cross which is a buy signal. I would only buy if the last tag on the DrawingObject is 'GoingUpxxxx'

    If there are examples that would be really appreciated. Thanks!!

    #2
    Hello Graci117,

    That is possible however that is only possible in an unlocked/manually coded strategy and will only work in realtime.

    There is a sample of how to access the chart objects and also get their tag in the following page: https://ninjatrader.com/support/help...rawobjects.htm

    For your idea you would also need to make a list of the objects you have already used so that when you loop over the collection you can ignore the no longer relevant objects. I don't have a specific sample of using a List in this way but using lists in C# is a pretty straightforward task and there are many examples of using lists in regard to C# that you can view online.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    65 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X