Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartStyle properties dont work

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

    ChartStyle properties dont work

    When I do the same as in image below, I get error message "The name ´IsTransparent´ does not exist in the current context". Am I missing some using or what is wrong?



    Click image for larger version

Name:	image.png
Views:	109
Size:	79.2 KB
ID:	1331755

    #2
    Hello Marty125,

    I've made a test copy of the CandleStyle chartStyle and printed property which you may find helpful.
    IsTransparentCandleChartStyleTest_NT8.zip

    Note, this property can be used in State.Configure but the print also appears for cloned administrative instances which can be confusing. Printing this in State.Active would allow it to print only when selected for a chart.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      So this only works in ChartStyle class? Not in indicator?

      Comment


        #4
        Hello Marty125,

        Yes, this is a ChartStyle property.

        From an indicator you can access the ChartBars.Properties.ChartStyle of the chart.

        protected override void OnStateChange()
        {
        if (State == State.DataLoaded)
        {
        if (ChartControl != null)
        {
        if (ChartBars.Properties.ChartStyle.IsTransparent)
        {
        Print("All bars are currently set to transparent");
        }
        }
        }
        }
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          AWESOME, thank you so much!!!

          Comment


            #6
            Hi ChelseaB,

            in ChartStyles scripts there are these Remove properties lines

            Properties.Remove(Properties.Find("BarWidthUI", true));
            Properties.Remove(Properties.Find("DownBrush", true));
            Properties.Remove(Properties.Find("UpBrush", true));

            Is it possible to remove/hide these in an indicator script? Thank you​

            Comment


              #7
              ​Hello Marty125,

              No, properties would need to be removed from the chart style script.
              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
              553 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
              100 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              543 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              546 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X