Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Finds objects from instruments that are not selected

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

    Finds objects from instruments that are not selected

    I run an indicator that gathers information from manually drawn Fibonacci lines. Problem is that it finds ALL fib objects in a window even the ones on instruments not showing (the window only shows one instrument at a time). This is what happens until I select any other instrument, because then the first watched instrument's objects will not be found.

    So basically when I have watched all the instruments with an object in, the indicator only "sees" the current instrument's objects. That is great, but it takes a while to go through all the instruments and it is most likely not how it should work.

    And as I do turn NinjaTrader off from time to time I need to go through the hole process again.

    I have not tested if the same thing happens with other objects than Fibonacci.

    Cheers

    #2
    UpUp&Away,

    Unfortunately I am not following you. What do you mean by instruments not showing? Instruments that are not on the chart will not have any draw objects. The indicator will not pick up anything that is not on the chart for the instrument the indicator is running on.

    Please clarify what you mean by "even the ones on instruments not showing". What exactly do you have on your chart? How is it setup? All draw objects on the chart for the same instrument the indicator is running on will be accessed by the code.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Example:
      -New chart window
      -Select ES 06-10
      -draw some fib lines
      -Select CL 07-10
      -draw some fib lines
      -save workspace
      -exit NinjaTrader (maybe it happens even with only closing/opening workspace)
      -start NinjaTrader

      what you see now is the window with CL 07-10
      my indicator is at this stage able to get information from objects drawn with ES 06-10 selected.

      - Select ES 06-10
      my indicator is at this stage ONLY able to get information from objects drawn with ES 06-10 selected.

      This example were with only objects draw on two instruments, with objects on an additional third instrument the indicator would get information on those objects at the last stage above. After selecting that third instrument the indicator would only get information from the very instrument my eyes are watching, even when I go back to for example ES 06-10. Only that very instrument's objects (Fib objects).

      I run the latest version 16 and the situation was the same with version 15.

      Hope that is more clear than my first shot.
      Cheers

      Comment


        #4
        UpUp&Away,

        Thank you. We will look into it.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi UpUp&Away !

          The bug you reported is fixed and the fix will be available with the next update of NinjaTrader.

          Thanks for reporting,
          Christian
          ChristianSenior Software Developer

          Comment


            #6
            Great!

            Well done, I'm generally very pleased with the platform.

            Thanks

            Comment


              #7
              Problem still there

              Hi there!

              Unfortunately there is no change in behavior with version 17. Perhaps I have misunderstood something.
              My code looks like the following:


              Code:
               
              // Loops through the DrawObjects collection
              foreach (IDrawObject draw in DrawObjects)
              {
                  // Finds fib objects
                  if (draw is IFibonacciRetracements)
                  {
                     code ...............
                   }
              }
              Is there something I'm missing to differentiate between which instruments object I receive information on?

              Thanks,

              Comment


                #8
                Hi UpUp&Away !

                Yes, the loop through the DrawObjects collection is correct.

                I retested the screnario you described in post #3 and this is working here. Can you please provide us with reproducible steps (like in your post #3), what exactly is not working as expected ?

                Thanks and kind regards,
                Christian
                ChristianSenior Software Developer

                Comment


                  #9
                  It sure does work!

                  Great Christian,
                  it works fine.

                  After having saved the workspace using version 17 it works fine.
                  When I first checked to see if it worked as expected I used a workspace saved with previous version.

                  Thanks

                  Comment


                    #10
                    Superb. Thanks for reporting and testing this issue.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    601 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    347 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    103 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    559 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    558 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X