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 CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    52 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    29 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    194 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    355 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    274 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X