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

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?
        BertrandNinjaTrader Customer Service

        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 Skifree, Today, 03:41 AM
              1 response
              4 views
              0 likes
              Last Post Skifree
              by Skifree
               
              Started by usazencort, Today, 01:16 AM
              0 responses
              1 view
              0 likes
              Last Post usazencort  
              Started by kaywai, 09-01-2023, 08:44 PM
              5 responses
              603 views
              0 likes
              Last Post NinjaTrader_Jason  
              Started by xiinteractive, 04-09-2024, 08:08 AM
              6 responses
              23 views
              0 likes
              Last Post xiinteractive  
              Started by Pattontje, Yesterday, 02:10 PM
              2 responses
              23 views
              0 likes
              Last Post Pattontje  
              Working...
              X