Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

detect other indicator Plots

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

    detect other indicator Plots

    Hello,

    I have an indicator (no access to code) that plots UpTriangle for a buy signal, and plots DownTriangle for a sell signal,
    is there a way to detects when it plots any triangle so my strategy can execute a trade based on that plot ?

    thank you in advance,

    #2
    You can iterate though drawing collection every X seconds and find new plots.
    Or make event that triggers when new plot added (but I'm not sure it's possible in NT).

    Comment


      #3
      Leeroy_Jenkins can you help a code snippet... thank you

      Comment


        #4
        Hello pechtri,

        Below is a link to the help guide on looping through the DrawObjects collection.


        MyIndicator myindy;

        myindy = MyIndicator();

        foreach (DrawingTool draw in myindy.DrawObjects.ToList())
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          @NinjaTrader_ChelseaB, I have another scenario that is, the indicator is completely inaccessible in a strategy and can only be added to a chart. How to detect when a new down or up triangle has been drawn on the chart using a strategy?​

          Comment


            #6
            Hello Nyman,

            I'm not aware it is possible to make an indicator that cannot be accessed from an unlocked NinjaScript Strategy.

            However, you can try looping the DrawObjects collection in the strategy to see if the drawing objects are in the collection.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              NinjaTrader_ChelseaB, the same way Order Flow Volume Profile is inaccessible in ScriptEditor so is the indicator I am working with. I already saw the looping example from the reference page and I'm not satisfied with it. what is the index of the latest added drawing to the DrawObjects list?

              Comment


                #8
                Hello Nyman,

                The last added index would be DrawObjects.Count() - 1.

                DrawObjects.ToList()[DrawObjects.Count() - 1]
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  NinjaTrader_ChelseaB, many thanks for your input. Any idea how to determine when a change has happened to the DrawObjects list?

                  Comment


                    #10
                    Hello Nyman,

                    Unfortunately, there is not a collection changed event for the DrawObjects collection.

                    I will add your vote to the existing request for this, tracked with ID # SFT-1358.

                    Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

                    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

                    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Nyman just check it with timer every x milliseconds. Or just check within OnBarUpdate if other indicators/strategies draw on bar update. But in that case you may experience race conditions. This is when event would be handful but unfortunately.

                      Comment


                        #12
                        This is exactly the solution I seek. Just to clarify, the indicator plots a signal as an up or down triangle and does not draw an up-triangle or down-triangle. The solution described above is for when an indicator draws objects.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by NullPointStrategies, Today, 05:17 AM
                        0 responses
                        43 views
                        0 likes
                        Last Post NullPointStrategies  
                        Started by argusthome, 03-08-2026, 10:06 AM
                        0 responses
                        124 views
                        0 likes
                        Last Post argusthome  
                        Started by NabilKhattabi, 03-06-2026, 11:18 AM
                        0 responses
                        65 views
                        0 likes
                        Last Post NabilKhattabi  
                        Started by Deep42, 03-06-2026, 12:28 AM
                        0 responses
                        42 views
                        0 likes
                        Last Post Deep42
                        by Deep42
                         
                        Started by TheRealMorford, 03-05-2026, 06:15 PM
                        0 responses
                        46 views
                        0 likes
                        Last Post TheRealMorford  
                        Working...
                        X