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

Adding multiple Bar Series in separate indicators and loading into Strategy

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

    Adding multiple Bar Series in separate indicators and loading into Strategy

    Hey. Say I have an indicator A that is adding a volumetric bar series and indicator B which is loading daily chart, hourly, 15min. Now I use there two indicators in a strategy together. Will this mess up the bar series array in the strategy?

    #2
    No. But, the strategy has to load all of the data series needed by either nested indicator during the strategy's state.configure, and you should instantiate the indicators during state.dataloaded.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello Magzor,

      Bruce is providing good information.

      The strategy will also have to call the same AddDataSeries() calls as any hosted indicator that calls AddDataSeries().

      Adding a data series does not change other data series.

      Your logic can process on specific BarsInProgress.


      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi Bruce and Chelsea,
        Thanks for the replies!
        So as far as I understand from the replies; as long as the same type of bar data is loaded, then the order of the BarsArray does not have to match between the indicator and the strategy

        Comment


          #5
          Correct, the order loaded does not have to match. They just have to all be there somewhere. If the inner (nested) indicator tries to access something that wasn't loaded in the outer (hosting) indicator, it will raise an exception and terminate.
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment


            #6
            Perfect, that makes what I want to design a lot more flexible. Thanks for the explanation!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by usazencort, Today, 01:16 AM
            0 responses
            1 view
            0 likes
            Last Post usazencort  
            Started by kaywai, 09-01-2023, 08:44 PM
            5 responses
            602 views
            0 likes
            Last Post NinjaTrader_Jason  
            Started by xiinteractive, 04-09-2024, 08:08 AM
            6 responses
            22 views
            0 likes
            Last Post xiinteractive  
            Started by Pattontje, Yesterday, 02:10 PM
            2 responses
            20 views
            0 likes
            Last Post Pattontje  
            Started by flybuzz, 04-21-2024, 04:07 PM
            17 responses
            230 views
            0 likes
            Last Post TradingLoss  
            Working...
            X