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


          #5
          Hello,
          At this time, in the BarsType.Barsperiod there are only three numerical properties: BaseBarsPeriodValue, Value and Value2.
          It would be possible, in the next release, add more properties to Barsperiod, for example: Value3, Value4, Value5, ...
          It would also be very useful to have a String custom property.
          Thanks​

          Comment


            #6
            Hello cls71,

            Thanks for your notes.

            We are tracking interest for this in an internal feature request ticket and I have added your vote to this feature request. This request is being tracked under the number SFT-1269.

            As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.

            Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by knowmad, 05-07-2024, 03:52 AM
            6 responses
            59 views
            0 likes
            Last Post knowmad
            by knowmad
             
            Started by xepher101, 05-10-2024, 12:19 PM
            9 responses
            112 views
            0 likes
            Last Post jeronymite  
            Started by tkaboris, Today, 07:53 PM
            0 responses
            1 view
            0 likes
            Last Post tkaboris  
            Started by JGriff5646, Yesterday, 05:47 PM
            2 responses
            22 views
            0 likes
            Last Post JGriff5646  
            Started by lezlebric, Today, 06:32 PM
            0 responses
            13 views
            0 likes
            Last Post lezlebric  
            Working...
            X