Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to add new PANEL without add new indicator?

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

    How to add new PANEL without add new indicator?

    I recently started programming and try to write an indicator.
    How to add a new panel to the chart? Without the use of an additional indicator. With code, function. Like on a picture.

    I want to display the Delta there.
    I tried this:
    ChartControl.ChartPanels.Add (new ChartPanel (ChartControl));
    It does not help me.
    This code also does not add a second panel:
    AddPlot (new Stroke (Brushes.Yellow, 5), PlotStyle.Bar, "MyPlot");
    Only a separate indicator that works.
    I need sample code.
    ---
    I want to display Delta there. The difference between bid & ask.
    Maybe by using Plot (PlotStyle.Bar) or SharpDX.Direct2D1.RenderTarget.FillRectangle();
    Is it possible to add a plot by code? To the bottom panel.
    Help me find at least some way. Create such a panel and fill it. Then, I want to turn it on-off by button.
    Sorry for my bad english.
    Click image for larger version  Name:	 Views:	1 Size:	179.7 KB ID:	1056082
    ---
    Я недавно начал программировать и пытаюсь собрать свой индикатор.
    Как добавить новую панель на график? Без использования дополнительного индикатора. С помощью кода, функции. Вот как на картинке.
    Я хочу там выводить Дельту.
    Я пробовал это:
    ChartControl.ChartPanels.Add(new ChartPanel(ChartControl));
    Это мне не помогает.
    Это код тоже не добавляет вторую панель:
    AddPlot(new Stroke(Brushes.Yellow,5), PlotStyle.Bar, "MyPlot");
    Только отдельным индикатором это работает.
    Мне нужен пример кода.
    Last edited by Udimuz; 05-06-2019, 10:49 AM.

    #2
    Hello Udimuz,

    You haven't explained what is being shown in the added panel.

    Some series (either data series or indicator) needs to occupy that panel.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello, ChelseaB.
      I want to display Delta there. The difference between bid & ask.
      Maybe by using Plot (PlotStyle.Bar) or SharpDX.Direct2D1.RenderTarget.FillRectangle();
      Is it possible to add a plot by code? To the bottom panel.
      Help me find at least some way. Create such a panel and fill it. Then, I want to turn it on-off by button.
      Sorry for my bad english.

      Comment


        #4
        Hello Udimuz,

        An indicator can add 1 new panel when an instance added if IsOverlay is set to false.
        (This would occur when adding an instance of the indicator, not when reloading an existing instance)

        However, indicators can only add the one new panel, they are not able to add multiple new panels.

        Yes, you could add plot to that panel with PlotStyle.Bar.


        As far as turning it on or off by a button, you could change the color of the plots to Brushes.Transparent to hide the plot bars..
        Last edited by NinjaTrader_ChelseaB; 05-06-2019, 11:02 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Chelsea. You misunderstood me.
          I asked: how to add a second panel, BEING IN THE FIRST PANEL

          Comment


            #6
            I have another questions, in the next post

            Comment


              #7
              Hi Udimuz, thanks for your reply.

              Indicators can only generate one panel. I will submit a feature request to add the ability to create more than one panel per indicator. For an implementation that would work in the current state, you would need to carefully plot out all of the data in one panel using OnRender similar to how the OrderFlow Volumetric bars displays the bar statistics when "Show bar statistics" is enabled like so:



              Please let me know if you have any additional questions.


              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              647 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              367 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              108 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              571 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              573 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X