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

Error : A hosted indicator tried to load additional data. All data must first be load

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

  • Harry
    replied
    I have done exactly the same thing, but could not reproduce today.

    The issue was 100% reproducible when I had posted the chart.

    And the chart shows the problem as the indicator was consistently applied to a different contract month when compared to the chart bars.

    But today I am not able to reproduce the issue.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Harry,

    I would not be able to answer this until I am able to reproduce the behavior.

    I've set my PC clock back to 8/27 and tested the behavior with the ZB 12-17 but I was not able to reproduce.

    Please let me know if you have a set of reproducible steps.

    Leave a comment:


  • Harry
    replied
    The question here is why would an indicator be applied to ZB 09-17, when it is added to a minute chart for ZB 12-17?

    See first chart post #29.

    At the bottom of the screenshot you will notice that the chart is ZB 12-17. The red arrow in the upper left corner shows that the indicator is being applied to ZB 09-17.

    Why is this?
    Last edited by Harry; 09-12-2017, 12:06 PM.

    Leave a comment:


  • Harry
    replied
    I have tried to reproduce the behavior today and I could not reproduce. NinjaTrader now behaves in a different way compared to August 24.

    On August 27 I had opened a chart with the contract ZB 12-17 prior to rollover. The chart was displayed as expected.

    Then I had added the indicator to the chart and in the upper left corner it was clearly shown that the indicator was not applied to the contract ZB 12-17 but it was instead applied to front month contract 09-17 (see red arrow on the chart).

    Today, when I add an indicator to a chart that uses a future contract month, the indicator is applied to that same contract month. For example, when I apply the same indicator to a chart for ZB 03-18, the indicator is applied to that same contract month ZB 03-18, and not to the current front month contract ZB 12-17.

    Today I am unable to produce a scenario where the indicator is applied to the front month contract instead of the selected contract.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Harry,

    There are some items with secondary series that are being corrected with the next iteration of NinjaTrader 8.

    In testing that this behavior has been corrected in the current internal build, I was not able to reproduce the behavior with the public release 8.0.8.0.

    I've made a quick video and I'm attaching my test script. Am I taking the steps to reproduce the behavior correctly?

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    I'm testing using the CL 11-17 which will be rolling over in the next few days.

    Is this only reproducible with the ZB 12-17?
    (I can set my clock date back and retest if needed)
    Attached Files

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Harry,

    Thank you for reporting the behavior.

    I will look into this and report the behavior if I am able to reproduce.

    I appreciate your patience.

    Leave a comment:


  • Harry
    replied
    False contract month loaded after changing the bar period

    NT 8.0.8.0 Had a special case this morning.

    (1) I open a 30 min chart with a future contract month (such as ZB 12-17) a few days prior to rollover in mode "mergebackadjusted". As a result NinjaTrader correctly displays a chart for the current contract month ZB 09-17.

    (2) I then apply an indicator that loads daily and minute data via a secondary bar series in State.Configure.

    Code:
    AddDataSeries(BarsPeriodType.Minute, 1);
    AddDataSeries(BarsPeriodType.Day, 1);
    (3) In a third step I change the bar period from 30 min to 60 min and get the well-known error message

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


    Hidden problem

    The message was obtained although there was no hosted indicator. The indicator does not call any other NinjaScript indicators and was simply applied to a plain chart.

    The real problem lies elsewhere.

    When I add an indicator to a chart with a contract that has not yet become the front month contract, NinjaTrader substitutes the selected contract with the front month contract. In the case that I have described above, the indicator applied to ZB 12-17 is actually running on ZB 09-17. This is shown in the upper left corner of the chart.

    However, when I change the bar period from 15 min to 60 min, the subsitution does no longer work. NinjaTrader now tries to run the indicator on data for ZB 12-17 which is not yet loaded. This causes the error message.


    Problem can be identified on the chart

    When the indicator is first applied to the chart it runs on the current front month contract ZB 09-17. When the bar period is changed from 30 min to 60 min, the indicator is now applied to the future front month contract ZB 12-17. As NinjaTrader has not loaded the data for this contract month in mode mergebackadjusted, the indicator fails to run.

    See screenshots below.
    Attached Files
    Last edited by Harry; 09-12-2017, 12:03 PM.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello DarthTraderson,

    Your request for the unsatisfied hosted data series error message to include the bars period information of the referenced series is being tracked with ID #SFT-2548.

    Please note, it is up to the NinjaTrader Development to decide if and when a feature request will be implemented.

    Thank you for the suggestion. Please let me know of any other requests you have for the NinjaTrader platform.

    Leave a comment:


  • DarthTraderson
    replied
    Yes I would like to add a feature request.

    In addition to the error message there should be a comment on which DataSeries should be added to the host script, right after compilation. Otherwise and using locked and protected indicators we don't know which series to add. We always have to ask the developer.

    Please give this request a very high priority because it is easy to implement but in my opinion very critical for further usage of NT8 and third party tools.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello DarthTraderson,

    Yes, in the latest version of NinjaTrader 8 (8.0.7.1) any series added to an indicator must also be added to the host strategy or indicator.

    From the help guide:
    "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. For further reference, please also review the 2nd example below and the 'Adding additional Bars Objects to NinjaScript' section in Multi-Time Frame & Instruments"



    Unfortunately, no, NinjaTrader does not detect added series when the script is compiled, but instead detects this in run-time as the script is enabled. If the hosted series is not satisfied the error will be produced.

    Would you like to submit a feature request to trigger an error after the script is compiled if the hosted series is not satisfied in the host script?

    Leave a comment:


  • DarthTraderson
    replied
    Does this error still occur in latest version of NT8?

    Am I right, that I have to look inside every indicator which I am using in my strategy regardless if it is an system or third-party indicator to detect usage of additional DataSeries?
    Otherwise I am not able to know if I have to duplicate AddDataSeries calls?

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hello Sledge,

    The error "A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state." does not require real-time data, this only requires historical data.

    Is this the error you are reporting?

    Does the indicator call any other indicators?

    I have asked:
    Is the script calling the Pivots or adding a secondary series and using GetBar()?

    You have responded:
    No.

    Then you say:
    1) Open Instrument Editor,
    2) changed to US Equities ETH
    3) add TDA Symbol $ISSU to ^ADV

    You are saying that you are adding additional series to the script with AddDataSeries(), is this correct?
    But .GetBar() is not being called, is this correct?

    Please simplify your indicator to the bare minimum to reproduce this behavior and post an export with your next post so that I may test on my end.
    Last edited by NinjaTrader_ChelseaB; 02-28-2017, 10:01 AM.

    Leave a comment:


  • Harry
    replied
    There is a general problem with release 8.0.4.0 that it does not correctly apply instrument settings. For example all changes in trading hours are not applied to the template <instrument settings>. Changes in rollover dates are not correctly applied.

    I have switched back to 8.0.3.1.

    It may well be that the problems go away when you go back to the prior release.

    Leave a comment:


  • sledge
    replied
    Is your error being triggered by a script? Correct.

    Is the script calling the Pivots or adding a secondary series and using GetBar()? No.

    Do you have TickReplay enabled? No.

    (Is your chart completely blank and not loading cached historical data?) No, but the chart isn't updating. It does work fine on standard symbols that are predefined (SPY, ^VIX). Some how I managed to get it to work last week Monday morning around 8:00am, but I could not for the life of me get it today. I gave up. I works fine in NT8B9 on my other laptop, since the Instrument edit doesn't get lost.

    Further information: Pivots throws the same error, and so does EMA in that chart.
    This chart is completely dead.

    I created a new chart and my indicator is now working.

    So the steps I have to do with NT8B4 when restarting -

    1) Open Instrument Editor,
    2) changed to US Equities ETH
    3) add TDA Symbol $ISSU to ^ADV
    4) connect to TDA
    5) Create new ^ADV chart
    6) Add indicator to chart.

    If I don't do these steps in this order, it probably won't work.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    Hi sledge,

    Is your error being triggered by a script?

    Is the script calling the Pivots or adding a secondary series and using GetBar()?

    Do you have TickReplay enabled?

    (Is your chart completely blank and not loading cached historical data?)

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by GussJ, 03-04-2020, 03:11 PM
16 responses
3,279 views
0 likes
Last Post Leafcutter  
Started by WHICKED, Today, 12:45 PM
2 responses
19 views
0 likes
Last Post WHICKED
by WHICKED
 
Started by Tim-c, Today, 02:10 PM
1 response
8 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by Taddypole, Today, 02:47 PM
0 responses
5 views
0 likes
Last Post Taddypole  
Started by chbruno, 04-24-2024, 04:10 PM
4 responses
51 views
0 likes
Last Post chbruno
by chbruno
 
Working...
X