Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnRender rectangles on both chart bars & panel bars

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

    OnRender rectangles on both chart bars & panel bars

    It's been a long time since I worked with panel bars and I've forgot the code. I remember seeing it a long time ago,
    so apologies!

    I'm using a plot in the panel bars, but I want OnRender to be able to draw in the panel and the chart.

    I know to use base.OnRender(chartControl, chartScale);

    but I forgot the precise settings to be able to draw on both.

    Thank you in advance!

    #2
    Hello davydhnz,

    Rendering in multiple panels is not officially supported, but is possible using unsupported code.

    Below is a link to an example on the User App Share.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks NinjaTrader_ChelseaB

      Comment


        #4
        NinjaTrader_ChelseaB

        Is it possible to only draw on the price bars with OnRender,
        but also have the default Ninjatrader volume bars panel underneath?

        I'm trying

        IsOverlay = false;
        DrawOnPricePanel = true;

        and it refuses to draw on the chart if I have "Panel 2".
        It will only draw if I put "Same as the input series"
        but I want the volume bars on their own panel.

        Thanks in advance.​

        Comment


          #5
          Hello davydhnz,

          Are you asking about adding a data series using Volume bars to a new panel in the Data Series window?

          Are you asking about the VOL indicator?

          DrawOnPricePanel only affects drawing tool objects. This does not affect custom rendering in OnRender().

          An indicator is intended to only render in the panel the indicator is applied to.
          We recommend using two indicators if you need to render in two panels.
          However, the User App Share script I provided you a link to, uses unsupported code to render in multiple panels.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Yes,

            I want to have a volume plot in a new panel which I can colour easily using non-OnRender code,
            but I want to draw certain things based on the volume around the price bars using vectors... thanks for your help

            Comment


              #7
              Hello davydhnz,

              Plots will only appear in the panel the indicator is applied to.

              If the indicator is an a separate panel you can call Draw tool methods with DrawOnPricePanel true and the drawing tool objects will appear on the price panel.
              If the objects are custom rendered, the supported approach would be to use two separate indicators, one applied to the price panel, and one applied to it's own panel.
              It would require unsupported code to custom render in multiple panels.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              556 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X