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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hyper, Yesterday, 09:02 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by damianfanaro, Today, 06:28 AM
        0 responses
        1 view
        0 likes
        Last Post damianfanaro  
        Started by Impeesa, Today, 12:53 AM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by artson, Today, 05:40 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by Impeesa, Today, 03:17 AM
        0 responses
        8 views
        0 likes
        Last Post Impeesa
        by Impeesa
         
        Working...
        X