Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator finding drawobjects from previous symbol on same chart window

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

    Indicator finding drawobjects from previous symbol on same chart window

    Hi guys,

    There is something funny going on with my drawing tools on charts, and I am not sure if it is intended or not, or perhaps I’ve messed up something in my code...

    If I have a drawing object on a chart, then change the symbol to a new symbol which doesn’t have any of that drawing object type, my indicator is still finding a ghost drawing tool there, even though if I right-click on the new symbol and bring up the drawing objects, it displays none.

    Is there some sort of filter I need to add to my loop to ensure it only brings up objects from the current displayed symbol and not a prior symbol in the same chart window? I first noticed this when I was writing an indicator for horizontal lines and have come across it again for the Risk Reward tool.

    I have attached a sample indicator to reproduce using the following steps:
    1. Open up a new chart (I used 5min EURUSD) when connected to live or replay data
    2. Add the attached indicator ‘TestingDrawingTools’
    3. Open a Ninjascript Output window
    4. Ensure there are no previous drawing tools on the chart
    5. Draw an RR tool
    6. Observe the output window is saying it has found ‘1’ RR tool on the chart
    7. Draw another RR tool on the same chart. Observe the output window is saying it has found ‘2’ RR tools on the chart
    8. Change the symbol to something else (I used AUDUSD)
    9. Observe the output is still finding 2 RR tools on the chart (even though there are none on this new symbol)
    10. Right click on the chart and go to Drawing Tools > Drawing Objects
    11. Observe there are no RR drawing objects on the chart
    12. Exit the drawing objects dialoug box
    13. Draw an RR tool on that chart
    14. The output window has now increased to finding 3 objects (2 from the old symbol and 1 that we have just drawn)
    15. Bring up the drawing objects for the chart, and it is showing only the 1 object even though the output window still says 3.


    Thanks guys, any help appreciated.
    Cheers,
    Shane
    Attached Files

    #2
    For some reason clicking quote on your post didn't bring up any of your old message here.. but

    Take a look at last sentence of post #6 and then reference code in post #5




    -=Edge=-
    NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

    Comment


      #3
      Hey Edge,

      Thanks for your help on that! Adding IsVisible as a filter in the 'if' statement does fix this behaviour… much appreciated.

      Although I think this still needs NT supports attention;
      In post #4 of http://ninjatrader.com/support/forum...ad.php?t=79764 Dave said this was expected behaviour for drawing objects created from Ninjascript, as they are attached to the Chart Panel as opposed to user drawn objects which are meant to be attached to the Instrument. However this does not seem consistent with what I am seeing, as all the drawing objects used in the steps of my original post are all manually/user drawn (not drawn with Ninjascript).

      I also noticed something else which appears to be a bug; If you continue to the bottom of my steps in the original post, then add these steps:

      16. Right click the chart and go to Drawing Tools > Remove all Drawing Objects
      17. Now go back to the first symbol where we drew the two RR lines (in my case this was EURUSD) and observe these have been removed.

      To me this doesn’t seem correct; I shouldn’t have the user drawn objects from another instrument removed. I would expect that function to operate only on the instrument/chart which I am clicking in? If this is expected behaviour, then we need another option to remove all draw objects from just the chart/instrument we are viewing/clicking within.

      Thanks guys & cheers,
      Shane
      Last edited by ShaneAU; 05-08-2016, 03:08 PM.

      Comment


        #4
        I never noticed that, but Agreed.. When removing all drawobjects, I also would expect that only those drawn for the instrument your currently looking at would be those deleted..


        -=Edge=-
        NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

        Comment


          #5
          Hello,

          Thank you for the post.

          I was able to see what the sample is intended to demonstrate as well on my end, thank you for the sample.

          I will provide this to development, in either case if this is intended or not, it will be re reviewed to ensure the correct action is happening.

          NTEIGHT-9857

          Once I have further information I will reply back.

          I look forward to being of further assistance.
          Last edited by NinjaTrader_Jesse; 05-10-2016, 11:28 AM.
          JesseNinjaTrader Customer Service

          Comment


            #6
            Hi Jesse,

            Is it possible to get an update on what development found looking into this, and if there will be changes in b12?

            I was also interested to know if the 'Remove all drawing objects' will be fixed, so that it only remove from the instrument and not other instruments in the same chart window.

            Cheers,
            Shane

            Comment


              #7
              Hello,

              Thank you for the reply.

              It appears both items were resolved in the same request, in the upcoming beta you should see the note for this item in the change log.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              44 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              20 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              179 views
              0 likes
              Last Post jeronymite  
              Started by ghoul, Today, 06:02 PM
              0 responses
              10 views
              0 likes
              Last Post ghoul
              by ghoul
               
              Started by DanielSanMartin, Yesterday, 02:37 PM
              2 responses
              13 views
              0 likes
              Last Post DanielSanMartin  
              Working...
              X