• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    Chris L.NinjaTrader Customer Service

    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.
      Kate W.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Simon Investimens, Today, 03:26 AM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by fx.practic, Today, 05:15 AM
      0 responses
      4 views
      0 likes
      Last Post fx.practic  
      Started by guidoisot, Today, 05:03 AM
      0 responses
      3 views
      0 likes
      Last Post guidoisot  
      Started by EnveousColnago, Yesterday, 06:58 AM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Started by lindsayf, Today, 01:13 AM
      0 responses
      13 views
      0 likes
      Last Post lindsayf  
      Working...
      X