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

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.
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DawnTreader, 05-08-2024, 05:58 PM
    12 responses
    41 views
    0 likes
    Last Post DawnTreader  
    Started by sofortune, Today, 10:28 AM
    4 responses
    11 views
    0 likes
    Last Post sofortune  
    Started by Haiasi, 04-25-2024, 06:53 PM
    6 responses
    82 views
    0 likes
    Last Post joselube001  
    Started by gaz0001, Today, 10:09 AM
    1 response
    7 views
    0 likes
    Last Post Red_70
    by Red_70
     
    Started by tkaboris, Today, 06:27 AM
    4 responses
    13 views
    0 likes
    Last Post tkaboris  
    Working...
    X