Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add problem

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

    Add problem

    I have data available in NT for the Eurostoxx 50 index from 2003-2013 on minute and day basis. If I open the graph on a daily basis I see all days untill 2003. I have a new indicator using the add command with period.week. If I display Closes[1][0] I see all the closing prices from 2003-2013 changing on a weekly basis. So far so good.

    If I add exactly the same with period.week in my strategy and I print Closes[1][0] I notice that my data is only printed from dec 2006 - 2013. I am not able to use dat before dec 2006.

    It seems that in the strategy the add command is not loading all available data. The indicator is loading all the data. What could cause the difference, because I will need the weekly data in my strategy? Is there a restriction in the amount of data loaded?

    Kind regards,
    Rene

    #2
    Hello,

    If you've ensured the start date on the Strategy UI is set properly, one thing to experiment with is the amount of bars that need to be loaded before processing begins.

    When using something like

    if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired)
    return;



    This will help prevent out of bounds errors but will also mean more time will have passed before bar processing can begin.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi, live is unfortunately not that easy. I have already include that check. BarsRequired is only 50 bars, but the Closes[1] is only availbale after 1000 bars and beside that in the indicator it is working ok and the Closes[1] is already availbale after 50 bars. If have checked and have the same problem with other products.

      Kind regards,
      Rene Kreileman

      Comment


        #4
        50 bars would be about 1 year if using weekly data.

        Could you post a simplified version of your code that replicates the error you're seeing?

        Located in (MY)Documents\NinjaTrader 7\bin\Custom\Strategy
        LanceNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        17 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        16 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        9 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        38 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X