Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add values to BarsType

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

    Add values to BarsType

    How would I go about added parameters/values in ninjascript with a custom bars type?

    Currently, I can use bars.barsperiod.value/value2 but I'm not sure how to add any more than the two.

    I tried to add the following but it didn't work:

    Code:
    #region Properties                
                    [Range(0, int.MaxValue), NinjaScriptProperty]
                    [Display(Name = "Value3", GroupName = "Custom", Order = 1)]
                    public int value3
                    { get; set; }
     #endregion

    #2
    Hello Lumbeezl, thanks for your post.

    You can only rename the existing parameters Value and Value2 currently. You can modify the properties with SetPropertyName e.g. SetPropertyName("Value", "MyCustomValue");

    I'll add a feature request so that we can add as many parameters as needed.

    Best regards.

    Comment


      #3
      Hello Lumbeezl,

      Thank you for your patience.

      I'm responding on behalf of my colleague Chris, who is out of the office today.

      I have added a vote for you to a current feature request to allow custom BarType properties. 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 in the Release Notes page of the Help Guide.

      Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

      Please let us know if we may be of further assistance to you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      85 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      47 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      67 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X