Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RC2: Draw.Region is drawing on top of Plots

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

    RC2: Draw.Region is drawing on top of Plots

    Hi there,

    Upon installing RC2 I have noticed 2 of my indicators are drawing regions above their plots.

    You can see by the indicator in the instrument panel I have set the region to 100% opacity and it completely covers the plot line (using AddPlot).

    The indicator in the lower panel includes both AddPlot and OnRender. All these plots appear behind the Draw.Region.

    Thank you.
    Attached Files

    #2
    Hello Sim22,

    So we can investigate further, could you provide a stripped down copy of your code which definitely draws differently in RC1 and RC2?

    If you need to be able to install RC1 to ensure the script you send shows a difference, you can get a copy from here,



    Direct link for RC1 : http://www.ninjatrader.com/ninjatrad...nstall.B13.msi
    Direct link for RC2 : http://www.ninjatrader.com/PlatformDirect

    When rolling back you will need to rename or delete your (My) Documents\NinjaTrader 8\db\NinjaTrader.sdf file.

    Thank you for any information you can provide. With this script we should be able to determine whether (and which) expected code breaking changes have affected your script, or whether there is a regression.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Hi Jessica,

      I actually have two PC's running NT8, one with RC1 and the other with RC2, so it's easy to compare . It does not display properly on RC2.

      Please find a copy of the volume indicator below and an image of how it should look. Even if you comment out the OnRender method this still occurs.

      Thank you.
      Attached Files
      Last edited by Sim22; 10-18-2016, 04:30 PM.

      Comment


        #4
        Hello, and thank you for your report. This behavior was confirmed on our end. We will be investigating this further. Please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.





        Tracking ID: QA-2303
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Sim22 and JessicaP,
          Thanks for bringing up this issue. I encountered the same problem but I thought it was by NT8 RC2 design and I ended up using Draw.Region() to redraw the line plots over the covered area. By the way, is there a function to invoke the re-plotting of a specific single line series plot, which was created using AddPlot() ?

          Comment


            #6
            Hello kkc2015, and thank you for your question. While this is an advanced programming topic, you can subscribe to the OnRender method,



            That method will give you the flexibility to reconfigure any drawn element on your chart, including those attached to your indicator, immediately prior to their being drawn. You will want to drill down into ChartControl from that page to see what options are available and how you would go about selecting individual indicators and individual lines attached to them.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by kkc2015 View Post
              Sim22 and JessicaP,
              By the way, is there a function to invoke the re-plotting of a specific single line series plot, which was created using AddPlot() ?
              Try this indicator as an example. It may not import as is as I haven't updated it for RC2, but you can still examine the code within. Pay particular attention to the sections within OnRender starting with:

              SharpDX.Direct2D1.PathGeometry

              Download NotePad++ to open and view easily.
              Attached Files

              Comment


                #8
                Sim22,
                Thank you very much for your quick response and help. Based on many of your responses from many threads, you have been a significant contributor to Ninjascript programming. Please keep up the good work as we would all benefit from it.
                For my Ninjascript indicator, I have already implemented SharpDX rendering for the graph intensive tasks. For another simple indicator, I was hoping to use a simple line routine to re-plot a line series. Any ways, using the Draw.Region() function to re-plot a line series did not result in much time penalty.

                Comment


                  #9
                  Thank you kkc2015 for your comments.

                  As for OnRender, I personally avoid doing it if I can do it via the Draw method, however if I had to plot a significant amount of Draw objects I prefer to use OnRender as it is only plotting within the visible chart not the whole data series

                  Simon.
                  Last edited by Sim22; 11-01-2016, 05:20 PM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by algospoke, 04-17-2024, 06:40 PM
                  3 responses
                  26 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by bmartz, 03-12-2024, 06:12 AM
                  3 responses
                  29 views
                  0 likes
                  Last Post NinjaTrader_Zachary  
                  Started by Aviram Y, Today, 05:29 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post Aviram Y  
                  Started by gentlebenthebear, Today, 01:30 AM
                  1 response
                  8 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by cls71, Today, 04:45 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Working...
                  X