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

AddDataSeries

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

    AddDataSeries

    Hi,

    I'm using:

    Code:
    AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 5 }, "CME US Index Futures ETH");
    How would the syntax be to add a bars object that has the same BarsPeriodType and Period as the primary data series?
    e.g. having a 15m data series added, if the indicator is loaded on a 15m chart

    Thanks
    Thomas
    Last edited by td_910; 10-18-2022, 02:23 PM.

    #2
    Hello td_910,

    Thanks for your post.

    There is no supported way to inherit the BarsPeriodType and Period from the primary data series that the script is running on.

    You would need to hardcode the added data series information you would want to use when calling AddDataSeries().

    AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm

    Let me know if I may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      That is great news

      One more feature request to put on the long list ...

      Comment


        #4
        Hello td_910,

        Thanks for your note.

        I have added a vote for you to a feature request that allows for the AddDataSeries() method to inherit the BarsPeriodType and Period from the primary data series. This request is being tracked under the number SFT-5639.

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

        Comment


          #5
          Can we add dataseries in strateggy builder? or do we haven an example of how strategy can work using two different time series? something more then info from docs?

          Comment


            #6
            Hello tkaboris,

            Thanks for your note.

            Additional data series are able to be added in a Strategy Builder strategy from the 'Additional Data screen'. For example, you could add a 1-Minute data series on this screen.

            See this help guide page about the Additional Data screen of the Strategy Builder: https://ninjatrader.com/support/help...onalDataScreen

            You could then get indicator or price information from the added data series. We do not have a reference sample demonstrating this.

            To get price data from an added series for a condition such as the close price of the added series, you could click the Price folder > Close > click 'Series 1' field > Data Series folder > select the added series > click OK.

            To get indicator data from an added series, such as the SMA value of the added series, open the Indicator folder > SMA > click the 'Input series' field > Data Series folder > select the added series > click OK.

            Note that you cannot submit orders to an added secondary series using the Strategy Builder. Submitting orders to an added secondary series would require unlocking the code from the Strategy Builder and manually programming your logic.

            Please let me know if I may assist further.
            Brandon H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            5 responses
            3,289 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            5 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            8 responses
            61 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by Option Whisperer, Today, 09:55 AM
            0 responses
            5 views
            0 likes
            Last Post Option Whisperer  
            Started by halgo_boulder, 04-20-2024, 08:44 AM
            2 responses
            24 views
            0 likes
            Last Post halgo_boulder  
            Working...
            X