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 yertle, Yesterday, 08:38 AM
            7 responses
            28 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by bmartz, 03-12-2024, 06:12 AM
            2 responses
            21 views
            0 likes
            Last Post bmartz
            by bmartz
             
            Started by funk10101, Today, 12:02 AM
            0 responses
            4 views
            0 likes
            Last Post funk10101  
            Started by gravdigaz6, Yesterday, 11:40 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by MarianApalaghiei, Yesterday, 10:49 PM
            3 responses
            11 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Working...
            X