Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Variable input for Additional Data Source

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

    Variable input for Additional Data Source

    Looking for help with setting the Value of an additional data series with a user input

    Example: Adding additional data for: Instrument <Primary> , Type "minute", Value"1"

    I want the Value of the 1 minute to be a input variable

    Thanks

    #2
    Hello DTSSTS,

    Unfortunately, this is not supported by NinjaTrader.

    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."
    https://ninjatrader.com/support/help...dataseries.htm


    As far as creating inputs, I recommend using the Strategy Builder to create inputs and then take a look at the code that is generated in the #region properties and State.SetDefaults.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Seems this would be something that would have been requested long ago. If you want to build conditions around NQ 09-20 as your primary source of conditions and logic but wish to trade MNQ 09-20 you would have to change your code of the strategy every time there is a roll over. so if you have have hundreds of clients using strategies in this manner they all have to edit the source code of the strategy. Which might not be accessible in a vendor supply and protected script.

      Comment


        #4
        Hello DTSSTS,

        This has been previously requested and is being tracked with ID #SFT-882.

        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

        Currently, you can use null for the instrument to get the same instrument as the primary, but not for the BarsPeriod information which is not available in State.Configure, and is not allowed to be used as an input to AddDataSeries().
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by vibrationketousa, Today, 12:26 AM
        0 responses
        1 view
        0 likes
        Last Post vibrationketousa  
        Started by vibrationketousa, Today, 12:24 AM
        0 responses
        3 views
        0 likes
        Last Post vibrationketousa  
        Started by hdge4u, Yesterday, 09:09 PM
        0 responses
        18 views
        0 likes
        Last Post hdge4u
        by hdge4u
         
        Started by hdge4u, Yesterday, 09:02 PM
        0 responses
        9 views
        0 likes
        Last Post hdge4u
        by hdge4u
         
        Started by stormcloudseven, Yesterday, 08:41 PM
        1 response
        10 views
        0 likes
        Last Post DavidTrades  
        Working...
        X