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, 03-31-2026, 09:41 PM
    1 response
    79 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X