Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shadows created by DrawRegion

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

    Shadows created by DrawRegion

    Quite often, when using DrawRegion() there are shadows.

    Any methods to get rid of those?
    Attached Files

    #2
    HI Harry, unfortunately none that I'm aware of - can you perhaps share the script producing this issue so I can check into here?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      in initialize put this code

      MaximumBarsLookBack = MaximumBarsLookBack.Infinite;

      Comment


        #4
        Thanks bukkan, however I was not able to see this happening on my end, tried this sample DrawRegion script with hardcoded lookback to infinite - http://www.ninjatrader.com/support/f...ead.php?t=4331

        Can you please try this, too and see if it would draw as expected?

        Thanks
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,
          if you filter the region like

          if (Time[0] > new DateTime(2010,8,1))
          {
          DrawRegion(...)
          }

          this will bring the shadow if maximum lookback is not set to infinity. thats what i encountered when i tried to drawregion sometimes back.

          Comment


            #6
            Thanks, however I could not reproduce an issue here with my filtered DrawRegion calls like you outlined - is their any DataSeries variable involved that would contain perhaps a dummy value at this point in time and hence needed to be filtered before passed to DrawRegion?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              this indicator do not have max lookback set to infinity. if you apply the same and scroll back you will see a shadow. if maxlook is set to infinite then it behaves ok.

              regards
              Attached Files

              Comment


                #8
                3. Should you be drawing regions based on DataSeries objects instead of indicator plots, be sure to create the DataSeries with the MaximumBarsLookBack.Infinite parameter if the region you are drawing would be maintained on the chart for more than 256 bars back.



                the help files too warns about this.

                Comment


                  #9
                  Thanks for the sample, however toggling between Infinite and 256 setting would show exactly the expected differences as noted in the helpguide you cited.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    yes Mindset is perhaps also facing the same expected issue (and he must have set the null data series to 0, thats y the tail). but then nothing can be said in concrete unless he post his code.

                    thanks

                    Comment


                      #11
                      If anybody runs into an unexpected outcome based on the previous info posted here, please either post your code demonstrating the issue or send us a note to support at ninjatrader dot com and reference this thread so we can check into.

                      Thanks for the support.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Sorry, was my own fault!

                        The shadow was my own fault, discoverd this today.

                        However, DrawRegion() will not always work correctly with NT7, if Maximum bars look back is set to "TwoHundredFiftySix". This is as expected, and it will display correctly, once you change it to "Infinite". That is due to the trade-off between RAM use and perfection.

                        Comment


                          #13
                          DrawRegion plotting convex rectangles

                          I use DrawRegion to color the opening range and the night session range.

                          The fill between the two horizontal lines looks a bit like Baloo, the bear.
                          Attached Files

                          Comment


                            #14
                            Harry, can you please share the code so I can look into on my end? Were you using Infinite or 256 for the DataSeries?
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Problem is independent from Infinite/256 lookback.

                              I have coded an indicator by adding just a few lines to the native NinjaTrader pivots indicator. Chart and indicator attached.

                              The problem:

                              When I reset the two data series that contain the region to be drawn, DrawRegion plots a triangle from the upper and lower border of the region to price (next bar). When the dataseries changes back from Reset() to display a value, DrawRegion draws a reverse triangle from price to the upper and lower border.

                              The region gets a convex shape, or in the chart below, an appearance like a speech balloon.
                              Attached Files
                              Last edited by Harry; 08-17-2010, 10:30 AM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by PaulMohn, Today, 09:12 AM
                              1 response
                              4 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by ETFVoyageur, Today, 05:50 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by thumper57, 05-11-2024, 04:30 PM
                              13 responses
                              38 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by llanqui, Yesterday, 10:29 AM
                              2 responses
                              15 views
                              0 likes
                              Last Post llanqui
                              by llanqui
                               
                              Started by llanqui, Yesterday, 11:10 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post llanqui
                              by llanqui
                               
                              Working...
                              X