Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to turn a chart panel completely off

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

    How to turn a chart panel completely off

    I am coding up a custom indicator that has a secondary Panel below the main price panel. This secondary panel has a couple of squiggly lines...no big deal. I want to present to the user a param exposed to the UI allowing them the ability to completely turn on/off this secondary panel. What I've tried so far is, upon user setting this param to 'off', I set this.PanelUI = 1 (I've also tried setting PanelUI = 0...same effect). All this does is turn off the squiggly lines in the secondary panel, so that then the user is just looking at a main price panel with a secondary panel still below but this secondary panel is completely blank except the panel label (with param values) persists in the upper left corner of the secondary panel. Is there a way to have the response to the 'off' value of the UI param be to make the secondary panel completely disappear so that the main price panel then consumes all the real estate?

    #2
    Hi upshot,

    It is not possible to prevent additional panels from showing if there is an indicator applied to that panel.

    Your script, you do have the choice to set Overlay = true; so that your indicator plots in the main panel. (if you change this you will need to remove and re-add the script)
    http://www.ninjatrader.com/support/helpGuides/nt7/overlay.htmv

    However, it would not be possible to remove the panel so that if there are other indicators using that panel they are visible.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, and thank you for your response. I am not quite sure I follow you though. I have a chart with a main price panel and a second panel below. On the second panel below I have 2 lines plotted. Then I want the user to be able to specify to turn off the second panel. I envision then removing the 2 lines from the second panel so that the second panel no longer has lines on it, then making the second panel go entirely away so that user is left only looking at the main price chart panel.

      You said, "...if there is an indicator applied to that panel". I guess then, in your parlance, upon the user specifying to change the chart by turning 'off' the second panel, I would be looking to "unapply" (as it were) the indicator from the second panel and subsequently make the second panel go entirely away.

      I suppose another way to ask is, once "there is an indicator applied to that panel" is there a way to later "unapply" the same indicator from said panel (and then make that panel go away since there would then be nothing "applied" to it)?

      Thanks!

      Comment


        #4
        Hi upshot,

        If there is an indicator or data series in the second panel you will not be able to remove it.

        Your options are to change the panel of the indicator to panel 1, or you can remove it.

        Once there are no longer data series or indicators in that panel, the panel will disappear automatically.

        To remove an indicator right-click the chart -> select Indicators... -> select the active indicator from the lower left -> either click Remove or set the Panel to 1.

        (A quick tip. You can hide a panel without removing it. To do this, right-click the price margin of the panel (that you do not want to hide) and select Maximize. This will minimize all other panels so that are not in view. They are still there but they are hidden. I am not aware of anyway to trigger this from code.)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by ticktradr, Today, 09:28 AM
        0 responses
        1 view
        0 likes
        Last Post ticktradr  
        Started by dibDab, Today, 07:33 AM
        0 responses
        2 views
        0 likes
        Last Post dibDab
        by dibDab
         
        Started by hamdan, Yesterday, 05:57 PM
        2 responses
        37 views
        0 likes
        Last Post hamdan
        by hamdan
         
        Started by NIncash, 09-21-2022, 02:20 PM
        3 responses
        36 views
        0 likes
        Last Post NIncash
        by NIncash
         
        Started by brenthilburn, Today, 06:19 AM
        0 responses
        6 views
        0 likes
        Last Post brenthilburn  
        Working...
        X