Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamic load of data: Error at NT8

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

    Dynamic load of data: Error at NT8

    NT8 gave the next info when I tried to use an indicator inside strategy, which use dynamic load of DataSeries (not fixed). (Indicator works from the chart, dynamically.)
    A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state.

    Anything to do with that? as this used to work at NT7?

    If I'll add that same DS to the strategy:
    Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.

    AddDataSeries( Data.BarsPeriodType.Minute, PeriodValue2 ); // and that PeriodValue2 is not fixed

    Example attached
    Attached Files

    #2
    Hello raffu,

    Thank you for your post.

    Your Strategy is working on my end when I uncomment the AddDataSeries() line. This is required in NinjaTrader 8. While this worked in some cases in NinjaTrader 7 it was not guaranteed and has been changed in NinjaTrader 8.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello raffu,

      Thank you for your post.

      Your Strategy is working on my end when I uncomment the AddDataSeries() line. This is required in NinjaTrader 8. While this worked in some cases in NinjaTrader 7 it was not guaranteed and has been changed in NinjaTrader 8.

      Thanks.

      Hi, actually that might work IF the PeriodValue2 is same as base beriod value (same TF) otherwise message (used otimizer with many PeriodValue2) :
      Strategy 'DynamicTestS': Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.

      And that would be needed to use strategy analyzer to find out nice time frames, actually I have done quite a lot of those tests earlier and now no idea how to do same type of strategies (and even that BarsPeriodType has been dynamic and given as parameter) (so this was the most simple form to show the "problem" but now more or less a feature at NT8)

      Comment


        #4
        FYI: if someone else seeing this as a problem.

        One workaround is to load a fixed set of those dataseries to the startegy (same ones as used to test via indicator) like

        AddDataSeries( Data.BarsPeriodType.Minute, PeriodValue2 ); //

        AddDataSeries( Data.BarsPeriodType.Minute, 5 );
        AddDataSeries( Data.BarsPeriodType.Minute, 15 );
        AddDataSeries( Data.BarsPeriodType.Minute, 30 );

        And just ignore those extra ones at strategy:
        if (BarsInProgress != 0) return;
        but probably it has some extra cost at performance as going to use more resources..

        Happy Trading.

        Comment


          #5
          Hello raffu,

          All historical data must be loaded in the strategy that calls the indicator.

          If a secondary series is added to an indicator, the same secondary series must be added to the strategy.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_ChelseaB View Post
            Hello raffu,

            All historical data must be loaded in the strategy that calls the indicator.

            If a secondary series is added to an indicator, the same secondary series must be added to the strategy.

            Hi Chelsea B.

            The point was that it is possible to load dataseries dynamically to the Indicator but not to the strategy... (at NT 8), here. (If it would be possible then a comment out that simple adding, same as to the indicator, would be enough but it is unfortunately not)

            If you run the optimizer with diff values to the given strategy, you can see that...
            but you can add that indicator with any values to the chart...

            Comment


              #7
              Hello raffu,

              I'm not certain that I am understanding.

              If you are going to add a secondary series to an indicator that is called from a strategy, that same data series must also be added as a secondary series using the same instrument, bar type, and interval to the strategy.

              If an indicator has a secondary series added, and that same series is not added to the strategy, this will result in an error.

              Dynamically adding a series is not supported.
              If you use a variable to select the instrument, bar type, or interval of a secondary series, this variable cannot be optimized over.
              Any added dataseries cannot change between optimizations.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              2 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              18 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              1 view
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              6 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Working...
              X