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 NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    93 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    152 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    80 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    53 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    65 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X