Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Input Series as parameter

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

    Input Series as parameter

    I would like to add a second input series as a parameter to my indicator.
    The user should be able to set the input series, so AddDataSeries is no option.
    How is this possible?

    #2
    Hello Bobin,

    Thanks for your post.

    It would be possible to add user inputs for AddDataSeries(), however, it is not fully supported for those inputs to be valid in State.Configure as noted in the AddDataSeries() help guide page linked below. Note that AddDataSeries() is the only method available to add a secondary series to a script.

    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 in 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.

    AddDataSeries(): https://ninjatrader.com/support/help...=adddataseries

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    77 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X