Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shadows created by DrawRegion

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

    #31
    Hi Harry, could reproduce an issue here with the Pivots call - we look into, thanks for reporting.

    Comment


      #32
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Harry, could reproduce an issue here with the Pivots call - we look into, thanks for reporting.
      Thanks for your answer.

      This really has become complicated. Call it the pain of a NinjaTrader user. This is the whole story.

      Objective: I just want to color a horizontal trading range on my with an indicator.

      Step 1: Try DrawRegion(). Result: The Baloo - Speech Bubble look. No way to code away the convex shape of the left and right border. Abandoned.

      Step 2: Try DrawRectangle(). Result: Trading range is correctly colored, but the color draws on top of the lines and text, making them invisible. With Zorder = -1, it is possible to place the colored range behind price, but all lines plotted from within the indicator are hidden by DrawRegion(), There is no way to differentiate the layer for the drawing object within an indicator. Abandoned.

      Step 3: I decide to to write a new indicator, by exposing the required data via DataSeries and catch the values with the new indicator. The new indicator works well, collects the data and by using Zorder = -1 within the indicator code, I can now plot the trading range behind all other lines and text. I am temporarily happy as my indicator works for the opening range, which is calculated from intraday data. Unfortunately, I also want to display pivot ranges, with the pivot indicator running in DailyBars mode collecting the Kinetick data. I am quite disappointed, as I understand that my newly coded indicator cannot use the values from my pivots (or the NinjaTrader pivots) indicator. Abandoned

      Step 4: I code an entirely new indicator calculating the pivots, pivot ranges and opening ranges from the instrument sessions and offsets just to display the opening, night session and pivot range. I have been successful, but it took me an entire day just to colour an existing range on my chart. There is room for improvement.

      Chart attached.
      Attached Files

      Comment


        #33
        Hi Harry - I'm sorry for the frustrations getting this to work the way you expected, we're checking into the issues you unfortunately stumbled upon on the way.

        Comment


          #34
          Thanks for answering.

          Many Draw() methods need a clean up.

          -> had lots of issues with diamonds in NT 6.5., they were quick to add, but I had to wait several minutes to remove them
          -> many of them decorating the right margin of the chart
          -> speech bubble look of draw region
          -> rectangles cannot be taught to plot behind price

          I think it is not a great deal to improve this.

          Originally posted by NinjaTrader_Bertrand View Post
          Hi Harry - I'm sorry for the frustrations getting this to work the way you expected, we're checking into the issues you unfortunately stumbled upon on the way.

          Comment


            #35
            Not transparent

            Here is another example.

            I use the DrawRectangle() method to draw rectangles on my chart.

            Another problem is this. If I set one of the serialized colours to transparent via indicator dialogue box, the rectangles are not transparent at all. All other colours that I select show as expected. Please advise.
            Attached Files

            Comment


              #36
              Hi Harry, I'm seeing the same here on a black background - will clarify why this is the case. Thanks

              Comment


                #37
                Harry, to add - what opacity's were you using for your rectangles drawn? My demo below in on 0.
                Attached Files

                Comment


                  #38
                  I used the same opacity for three different colours, opacity was set to 5. I expected that transparent is transparent even with opacity 5!


                  Originally posted by NinjaTrader_Bertrand View Post
                  Harry, to add - what opacity's were you using for your rectangles drawn? My demo below in on 0.

                  Comment


                    #39
                    Harry,

                    Unfortunately development has informed me that is simply how .NET handles opacity on transparent colors.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #40
                      Thank for your answer. I can use a workaround such as

                      Code:
                       
                      if (rangeColor == Color.Transparent)
                      opacity = 0;
                      so it is no problem.

                      Originally posted by NinjaTrader_Josh View Post
                      Harry,

                      Unfortunately development has informed me that is simply how .NET handles opacity on transparent colors.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      599 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      344 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
                      558 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      557 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X