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

Do I need to add a bar series even if I have a single bar timeframe?

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

    Do I need to add a bar series even if I have a single bar timeframe?

    hi,
    I encounter a problem when trying to run a strategy that has only a single timeframe - the one of the chart where I want to apply it. I cannot enable the compiled strategy in the Control Center. I get the following message in the output window:
    A hosted indicator tried to load additional data. All data must first be loaded by the hosting NinjaScript in its configure state.
    When I simply add a series of the same timeframe to the code, it runs. However it then passes through BarsInProgress 0 and 1 - which is normal but which will produce undesired results.
    I cannot understand if this is normal or where my error sits. So I have made a simple code example with the 2 options (adding a series or not) to clarify my problem. By the way, the same thing happens when I try to load the sample strategy SampleBreakoutStrategy.
    thank you for your help
    Andre
    Attached Files
    Last edited by alommel; 05-28-2017, 11:05 AM.

    #2
    Hello alommel,

    Thank you for reporting the behavior.

    I am able to reproduce this behavior where calling AddDataSeries() without calling any indicators in a Strategy is causing a 'A hosted indicator tried to load additional data' error using 8.0.6.1 and I have reported the behavior to development.

    Once I have a tracking ID for this behavior I will post this in this thread so that you may check for a fix for this behavior in the release notes once a new version of NinjaTrader 8 is released.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      thank you Chelsea for the quick reply

      Comment


        #4
        Hello alommel,

        As I was attempting to report this behavior I was no longer able to reproduce the behavior using your script.

        Are you still able to reproduce this error when enabling the strategy?

        If so, please send an email to platformsupport [at] ninjatrader [com] so that I may schedule a call with you to take a look at the error on your end.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,
          it is still the same. I just tried with the strategy "IsAddBarsNeeded" which I had posted initially. With the input checked (i.e. add the seires explicitly) it works, without it doesn't
          Yours
          Andre
          UPDATE:
          after installing the latest version of NT8 the problem did no more arise
          Last edited by alommel; 06-01-2017, 11:12 AM. Reason: found problem

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by stafe, 04-15-2024, 08:34 PM
          7 responses
          31 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by adeelshahzad, Today, 03:54 AM
          5 responses
          30 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by merzo, 06-25-2023, 02:19 AM
          10 responses
          823 views
          1 like
          Last Post NinjaTrader_ChristopherJ  
          Started by frankthearm, Today, 09:08 AM
          5 responses
          17 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          43 views
          0 likes
          Last Post jeronymite  
          Working...
          X