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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    163 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    81 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    184 views
    0 likes
    Last Post CarlTrading  
    Working...
    X