Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsType or ChartStyle Properties

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

    BarsType or ChartStyle Properties

    Hello,

    I've created my own BarsType and ChartStyle.
    Now I've searched a lot, but haven't found a solution yet.
    I have to pass several properties. (about 10-30)

    How can I pass properties (around 10-30) to BarsType or ChartStyle?

    #2
    Hello 1001111,

    At this time there is no supported way to add additional properties to a BarsType, they have the Value and Value2 properties which are supported. You can add public properties to the class but how you access that really depends on the context of what you are doing.

    I am not aware of any samples of this concept but you may be able to do something similar to the Cast being used in the volumetric example: https://ninjatrader.com/support/help...sub=volumetric

    That presumably (we cant see the code) has public properties defined in the bars type and then you can cast the bars type to your custom type to access its properties. I am not aware of how the properties would be defined so that they could correctly be used but that would be something you can give a try.

    The chart style would be a similar situation where it would need additional public properties however I am not aware of any sample of accessing a chart style with custom properties that I can provide.

    I look forward to being of further assistance.

    Comment


      #3
      I tried again. You cannot pass a property to BarsType. But ChartStyle And that's enough for me.


      Code:
          // example for other people
          public class ExampleChartStyle : ChartStyle
          {
      
              [NinjaScriptProperty]
              [Display(Name = "Demo", Description = "", Order = 1, GroupName = "Demo")]
              public bool Demo { get; set; }
      
              // ... code ...
          }
      Many thanks

      Comment


        #4
        Hello 1001111,

        I am not certain I understand your reply, is this a question/concern?

        Can you provide more detail if you still have a question or concern here?

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        580 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        335 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X