Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries dynamic parameters

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

    AddDataSeries dynamic parameters

    Hi,

    I am using an AddDataSeries in a custom column which also calls an indicator. How can I make the parameters of the AddDataSeries customizable, and not hard coded? like making them settings? I have the same AddDataSeries line in my custom column as well as my indicator that is called by the custom column.

    Thanks in advance

    #2
    Hello KhaosTrader,

    Thanks for opening the thread.

    It is possible to create parameters that control the logic for the data series you add, but you will not be able to create a parameter to load one data series and not load another. AddDataSeries() can only be hard coded at this time.

    This is a subject we receive a bit of feedback on. I will submit a vote to the feature request for this ability. This feature request is tracked with ticket ID SFT-882 and can be referenced in the release notes of the version of NinjaTrader 8 that includes the feature.

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

    Please let me know if I may be of further assistance.

    Comment


      #3
      Hello,

      Allow me to clarify, what if I want to load 3 different dataseries using AddDataSeries, can I select the parameters, like bartype and number of minutes for each of the series dynamically by a setting, or am I restricted to hard coding those parameters of the given set of dataseries I hard code load.

      Comment


        #4
        Hello KhaosTrader,

        Thanks for the reply.

        This would still constitute as calling AddDataSeries() dynamically and would not be possible. Arguments will have to be hardcoded.

        From the help guide:
        Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result into an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.


        Please let me know if you have any additional questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        581 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        338 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X