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

Custom properties for Bar Types

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

    Custom properties for Bar Types

    How can we add custom properties to bar types just like we do for indicators & strategies?
    Something like this compiles, but the custom property won't show up in the data series when I select the bar type

    Code:
      public class MyCustomBarType: BarsType
        {
    .....
            [Display( Name = "X offset", GroupName = "01. Colors", Order = 1)]
            public int XOffset { get; set; }
    ...
        }
    EB Worx
    NinjaTrader Ecosystem Vendor - EB Worx

    #2
    Hello EB Worx,

    Thank you for your post.

    When it comes to user inputs for a BarsType script, they don't work the same way as in indicators and strategies. You could use the available default properties, such as Value or Value2, and rename the properties as demonstrated on the SetPropertyName() page here:


    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Yes i know about these, but is there a way to add any extra custom properties?
      EB Worx
      NinjaTrader Ecosystem Vendor - EB Worx

      Comment


        #4
        Hello EB Worx,

        Thank you for your reply.

        No, there is not a way to add any extra custom properties. BarsType scripts do not work in the same way as Indicators and Strategies when it comes to properties, so you are limited to the properties listed on the SetPropertyName() page linked in my previous post.

        Please feel free to reach out with any additional questions or concerns.
        Emily C.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rocketman7, Today, 09:41 AM
        2 responses
        5 views
        0 likes
        Last Post rocketman7  
        Started by traderqz, Today, 09:44 AM
        1 response
        4 views
        0 likes
        Last Post traderqz  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by guillembm, Yesterday, 11:25 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by junkone, 04-21-2024, 07:17 AM
        10 responses
        150 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X