Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader.Data.Period

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

    NinjaTrader.Data.Period

    I am transferring the NT 6.5 Pivot indicator to NT 7, as I use it in an automated strategy that I also wish to transfer from NT6.5 to NT 7.

    I have transferred both strategy and indicator as outlined in the migration guide (http://www.ninjatrader.com/migration-guide-v7.php).

    When compiling for the first time, I get the following error code (translated from spanish):
    "NinjaTrader.Data.Period does not contain a constructor that takes arguments '2' "

    Any idea what I need do next?

    #2
    AnotherTrader,

    Can you share the lines of code that works in 6.5 but not in 7? We can then give it a run here and see what you might need to change.

    Code breaking changes for version 7 are available here.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I am using the Pivot indicator that was available in 6.5.

      Apparently it is line 102 that gives the aforementioned error when trying to compile:
      Code:
       
       dailyBars = Data.Bars.GetBars(Bars.Instrument, new Period(PeriodType.Day, 1), Bars.From, Bars.To, (Session) Bars.Session.Clone(), Data.Bars.SplitAdjust, Data.Bars.DividendAdjust);

      Comment


        #4
        AnotherTrader, correct there was a change in the underlying method going to NT7 - why are you not using our default Pivot indicator shipped with NT7?

        Comment


          #5
          When I tried to compile my NT 6.5 strategy with the NT 7 Pivot indicator, I had an error related to mismatching number of overrides ...

          Comment


            #6
            I see, thanks for the clarification. You'll want to use the built in NinjaTrader 7 pivots indicator, but change your strategy to reflect new changes in the overload. You can type Pivots( in your strategy code and it will provide the overload structure for this.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              OK, thanks. A job for tomorrow ...

              Comment

              Latest Posts

              Collapse

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