Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ERROR: A hosted indicator tried to load additional data.......

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

    ERROR: A hosted indicator tried to load additional data.......

    Hello Support,

    What does the following error mean?

    "A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state."

    Appreciate your help

    #2
    Hello TraderYoda,

    Thanks for your post.

    It means that you have a script that has AddDataseries(). You will need to add the same dataseries in the originating Ninjascript.

    From the helpguide: Prevention of Redundant Data Loading
    In NinjaTrader 7, multiple Data Series could be added within a script, such as an indicator, and that script could then be hosted by another script, such as a strategy. While this is still possible in NinjaTrader 8, there is a new safeguard in place to prevent redundant data loading in both the hosting script and the hosted indicator.

    When hosting an indicator which adds Data Series programmatically, the hosting script must include the same calls to the AddDataSeries() method as the hosted script. Without this, an error will result, which reads "A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its Configure state." Without this safegaurd in place, it would be possible for unnecessarily large amounts of data to be loaded concurrently, as would be the case in a direct call to an indicator method on each OnBarUpdate(). By adding the calls to AddDataSeries() to the hosting script, you can ensure that the data is loaded when needed. Also, when this is done in the hosting script, all identical calls to AddDataSeries() in the hosted script will be ignored, as the data is already available.
    Reference: http://ninjatrader.com/support/helpG...ng_changes.htm (search term "hosted") Examples shown in helpguide

    Further link: http://ninjatrader.com/support/helpG...dataseries.htm
    Note warning: Should your script be the host for other scripts that are creating indicators and series dependent resources in State.DataLoaded, please make sure that the host is doing the same AddDataSeries() calls as those hosted scripts would
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks very much

      Comment


        #4
        Let me be on record to say that this is bloody silly and absolutely unnecessary. This basically means that extracting functionality into indicators is a waste of time as I am still forced to clutter all my strategy code with data series that may never actively used inside that strategy.

        I read the explanation below but it doesn't make sense to me. You are effectively forcing an extra layer of complexity and code replication on developers, which could have been avoided through other means.

        Originally posted by NinjaTrader_Paul View Post
        Hello TraderYoda,

        It means that you have a script that has AddDataseries(). You will need to add the same dataseries in the originating Ninjascript.

        From the helpguide: Prevention of Redundant Data Loading
        In NinjaTrader 7, multiple Data Series could be added within a script, such as an indicator, and that script could then be hosted by another script, such as a strategy. While this is still possible in NinjaTrader 8, there is a new safeguard in place to prevent redundant data loading in both the hosting script and the hosted indicator.

        When hosting an indicator which adds Data Series programmatically, the hosting script must include the same calls to the AddDataSeries() method as the hosted script. Without this, an error will result, which reads "A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its Configure state." Without this safegaurd in place, it would be possible for unnecessarily large amounts of data to be loaded concurrently, as would be the case in a direct call to an indicator method on each OnBarUpdate(). By adding the calls to AddDataSeries() to the hosting script, you can ensure that the data is loaded when needed. Also, when this is done in the hosting script, all identical calls to AddDataSeries() in the hosted script will be ignored, as the data is already available.
        Reference: http://ninjatrader.com/support/helpG...ng_changes.htm (search term "hosted") Examples shown in helpguide

        Further link: http://ninjatrader.com/support/helpG...dataseries.htm
        Note warning: Should your script be the host for other scripts that are creating indicators and series dependent resources in State.DataLoaded, please make sure that the host is doing the same AddDataSeries() calls as those hosted scripts would

        Comment


          #5
          Hello molecool,

          Thank you for your post.

          I will forward your concerns to our development team.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by gemify, 11-11-2022, 11:52 AM
          6 responses
          803 views
          2 likes
          Last Post ultls
          by ultls
           
          Started by ScottWalsh, Today, 04:52 PM
          0 responses
          3 views
          0 likes
          Last Post ScottWalsh  
          Started by ScottWalsh, Today, 04:29 PM
          0 responses
          7 views
          0 likes
          Last Post ScottWalsh  
          Started by rtwave, 04-12-2024, 09:30 AM
          2 responses
          22 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by tsantospinto, 04-12-2024, 07:04 PM
          5 responses
          70 views
          0 likes
          Last Post tsantospinto  
          Working...
          X