Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Hiding/Unhiding chart bars

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

    Hiding/Unhiding chart bars

    Hi Folks:

    I am looking to add the option to hide/unhide bars programmatically from my indicator to increase usability. I used the transparency trick to hide them, but I think is lacking cause it doesn't hides them entirely with kagi lines, line on close, mountain and with point and figure. So I am looking to:

    1 - hide everything properly
    2 - best approach to unhide programmatically everything

    Regards

    #2
    Hello waldoalvarez,

    It is possible to set the ChartBars.Properties.ChartStyle.IsVisible to false to hide the char bars. (Unfortunately, the IsTransparent is read only)

    There would need to be some kind of series visible for the time and price scales to work. This could be an indicator plot or a data series.

    You could also set the Stroke and Stroke2 brush if you would like to hide Kagi, or the UpBrush and DownBrush to hide mountain, line on close, and point and figure.
    if (ChartBars.Properties.ChartStyleType == ChartStyleType.KagiLine)
    ChartBars.Properties.ChartStyle.Stroke2.Brush = Brushes.Transparent;
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, Thanks for your reply. I added two transparent plots with high and low. This mostly works but unfortunately when the chart is in autosize mode (pressing the F button) it totally fails giving me a chart with not scale (starting at 0 and 0.1 value visible). Not sure if this is a bug or I should do something else. If I drag the price axis (and the F button appears) it works perfectly.

      Comment


        #4
        Hello waldoalvarez,

        Plots that are transparent will not be plotted. So they will not affect the time and price scales.

        There would need to be some kind of series visible for the time and price scales to work. This could be an indicator plot or a data series.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you very much Chelsea!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          147 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Started by GussJ, 03-04-2020, 03:11 PM
          16 responses
          3,282 views
          0 likes
          Last Post Leafcutter  
          Working...
          X