Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error when creating new DataSeries

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

    Error when creating new DataSeries

    I'm getting an error message when adding a new DataSeries to my initialize method:

    "You only can access an indicator with the default input/bar series from within the 'Initialize()' method"

    Parameters:

    Code:
    private DataSeries xgapSeries;
    
     protected override void Initialize()
            {
                Add(PeriodType.Minute, 1);
    
                ...
    
                xgapSeries = new DataSeries(this, MaximumBarsLookBack.TwoHundredFiftySix);
    
                CalculateOnBarClose = true;
       }
    Never had that occurring before - how do I fix it?

    #2
    BTW, this is running on a 4-minute chart of the S&P E-Mini contract.

    Comment


      #3
      Please provide complete code of what is contained inside the Initialize() method so we can analyze it. Thank you.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        I emailed you the code to support request # 517536 which I filed earlier. Please do not post any code here but feel free to respond with any fixes.

        Comment


          #5
          Anyone?

          I sent you guys my code - anyone looking at this?

          Comment


            #6
            Never mind - I already figured it out myself.

            Where was everyone today??

            Comment


              #7
              molecool, as mentioned on our support page, the official NinjaTrader support hours are Monday through Friday from 8:30 AM EST until 6:00 PM EST, so the majority of us were out for the day when you sent in the code.

              Could you post the fix you found here so everyone can take a look?

              Thanks.
              AustinNinjaTrader Customer Service

              Comment


                #8
                I basically had to recode the entire strategy as assigning the series the way I had made no sense. Long story ;-)

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                647 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                367 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                108 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                571 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                573 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X