Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Object Selection Layers - Changing Stops Candle Draw

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

    Object Selection Layers - Changing Stops Candle Draw

    I have a custom indicator that draws lines and text on my on my charts. Quickly I get many many many objects. I have approx 100 objects per day and on a 15 day chart history that becomes 1500 objects or more.

    These objects draw over the candles. This can make it hard to see price in certain conditions and defeats the purpose of drawing lines and putting information on the chart.

    I noticed when I select an object and use the SHIFT - Mouse wheel to change the "Layer" or selection order the chart paint or draw actually STOPS UPDATING THE DRAW/PAINT of candles and price. I think this is a significant issue. A "do events" to ensure the chart draw proceeds may be good to put in the code there.

    Additionally if on right click on the CANDLE OBJECT you have menu objects "remove" and "properties" can you ad a "move to front" and "move to back" and "stay on top" It would assist people who use drawing objects greatly. We have a chat room where many NinjaTrader users meet in the day and all of us are constantly scrolling line draw/bars/fibs behind the candles. It becomes a pain...especially w/ many objects and when chart drawing "stops" while you are moving an item to lower layers.
    Attached Files

    #2
    mjc4118, thanks for your suggestions - for setting the ZOrder of those objects programmatically to plot behind price try ZOrder = -1 in your Indicator Initialize() drawing those objects. This way price action would remain better visible as you continue to add objects via your code.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      My initialize looks like:

      protected override void Initialize()
      {

      ZOrder = -1 ;
      mjc_ir = new DataSeries(this);

      }


      My draw objects still draw ON TOP OF price ...not underneath price so it seems that something else is required.

      Mark

      Comment


        #4
        Similar problem--not reproducible

        I have a template loaded on two different charts. One chart is 1597 ticks and the other is 320 ticks interval. On the 1597 ticks chart the price bars draw on top of all the indicators, but on the 320 tick chart the price bars draw behind all the indicators. Is this a NT7 bug?
        Ron

        Comment


          #5
          I am drawing on the price panel and on the indicator panel.
          How do I Set ZOrder so it works properly in this case?

          DrawOnPricePanel = false;
          DrawDiamond("SIHXdot" + CurrentBar.......);
          DrawOnPricePanel = true;
          DrawLine("LineHX"+ CurrentBar........);

          Comment


            #6
            mjc4118, unfortunately toggling the DrawOnPricePanel property dynamically is not supported - would ZOrder -1 work as expected if you limited it to one setting only per indicator?

            Ron, I tried with a template here but could not see the issue you described happen - could you perhaps send the template for testing to our support email (support at ninjatrader dot com)?

            Thanks in advance.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              It Appears that if I remove the "DrawOnPricePanel =..." then yes ZOrder Works.

              I also was able to reproduce some buggy behavior:
              If I put the "DrawOnPricePanel =.." code inside a conditional statement that is only triggered by Enabling a property (that is set to false by default) and the control loads and initializes with ZOrder then if you edit indicator and change the property to true to trigger the code then the chart fails to draw. Conversely loading an indicator that has both DrawOnPricePanel and ZOrder draws fine, it just does not set the ZOrder.

              Removing the indicator solves the problem. But drawing/painting and not setting ZOrder is preferred over failing to paint.

              Thanks for all your help. NT7 is looking REALLY good!

              Comment


                #8
                You're welcome, thanks for the kind words and reporting back - I would like to take a look at the 'buggy' behavior you noticed in your indicator, would you mind contacting me at support at ninjatrader dot com please?

                Thanks
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  OK, It worked once I used Shift + Control + Mouse Wheel to change ZOrder. I was not aware of this command sequence.

                  Thanks,

                  ron

                  Comment


                    #10
                    Great to hear Ron, yes this will manually change the ZOrder, this is not saved as part of a template, but will be in a workspace file.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Tin34, Today, 03:30 AM
                    2 responses
                    19 views
                    0 likes
                    Last Post Tin34
                    by Tin34
                     
                    Started by sastrades, Yesterday, 09:59 AM
                    2 responses
                    32 views
                    0 likes
                    Last Post brucerobinson  
                    Started by ETFVoyageur, Today, 12:52 AM
                    1 response
                    17 views
                    0 likes
                    Last Post Leeroy_Jenkins  
                    Started by lollers, Today, 03:26 AM
                    0 responses
                    12 views
                    0 likes
                    Last Post lollers
                    by lollers
                     
                    Started by aliyahany, Today, 03:16 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post aliyahany  
                    Working...
                    X