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 cre8able, 02-11-2023, 05:43 PM
            3 responses
            231 views
            0 likes
            Last Post rhubear
            by rhubear
             
            Started by frslvr, 04-11-2024, 07:26 AM
            8 responses
            111 views
            1 like
            Last Post NinjaTrader_BrandonH  
            Started by stafe, 04-15-2024, 08:34 PM
            10 responses
            44 views
            0 likes
            Last Post stafe
            by stafe
             
            Started by rocketman7, Today, 09:41 AM
            3 responses
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by traderqz, Today, 09:44 AM
            2 responses
            5 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Working...
            X