Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding historical contracts to Futures Instruments

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

    Adding historical contracts to Futures Instruments

    I am running into a bug when I am trying to enter historical futures contracts into the Instrument manager.

    Specifically I am trying to create the contract roll-overs for
    ES 12-99
    ES 09-99
    ES 06-99
    ES 03-99

    When I click Ok on in the Contract Months dialog box I get the following error in the trace file.

    2010-01-04 21:30:21:668 in OnUnhandledThreadException
    2010-01-04 21:30:22:089 ********* exception trapped *********
    2010-01-04 21:30:22:089 A duplicate value cannot be inserted into a unique index. [ Table name = nt_instrument,Constraint name = nt_instrument_ui ]
    2010-01-04 21:30:22:089 at System.Data.SqlServerCe.SqlCeCommand.ProcessResult s(Int32 hr)
    at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman dText(IntPtr& pCursor, Boolean& isBaseTableCursor)
    at System.Data.SqlServerCe.SqlCeCommand.ExecuteComman d(CommandBehavior behavior, String method, ResultSetOptions options)
    at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQue ry()
    at Wilson.ORMapper.Internals.Connection.TransactionCo mmand(Guid transactionId, Type entityType, CommandInfo commandInfo, IDbTransaction transaction, String sqlStatement, Parameter[] parameters)
    at Wilson.ORMapper.Internals.Instance.InsertObject(Tr ansaction transaction)
    at Wilson.ORMapper.Internals.Instance.PersistChanges( Transaction transaction, PersistDepth persistDepth, Boolean parentDeleted)
    at Wilson.ORMapper.Transaction.PersistChanges(ICollec tion entityObjects, PersistDepth persistDepth)
    at NinjaTrader.Db.Globals.CreateInstruments(Transacti on transaction, MasterInstrument masterInstrument)
    at NinjaTrader.Gui.InstrumentEditor.OnOk(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    This is NT7 64 Bit (7.0.0.6) running on Windows 7 Ultimate x64

    Thanks
    Rich

    #2
    Edit: I was able to reproduce. Please make sure you set your contract months before 12-2099.

    Curious: why would it make sense to create contracts which would expire 90 years from now?

    Comment


      #3
      I am recreating historical contracts for 1999 etc... not 90 years in the future.

      Thanks
      Rich

      Comment


        #4
        Unfortunately expiries before 2000 are not supported by NT.

        Comment


          #5
          There are trading strategies that rely on historical data going back as far as possible. With how you have implemented the continuous contracts for futures and doing an automatic merge requiring the data be loaded for each individual contract how is this possible when you do not support any contract expirations prior to 2000?

          What is the use-case that says we won't allow contracts prior to 2000 but we will allow you to use our software for 90 years into the future?

          I have historical minute data that goes back into the mid 90's how do you propose that I load this data so that I can use it without having to export the data, adjust the pricing data and reloading it?

          Respectfully
          Rich

          Comment


            #6
            Thanks for raising your opinion.

            Comment


              #7
              Dierk,

              How does NT proposed for a user to load data prior to 2000 for futures?

              Thanks
              Rich

              Comment


                #8
                Unfortunately this is not supported unless you went for the continuous contract like ES ##-##

                Comment


                  #9
                  I would use ES ##-## however that is not supported by all of the data providers from my understanding mine included (IB)

                  So what you are telling me is there is not other option

                  Thanks
                  Rich

                  Comment


                    #10
                    I'm not aware of any other option.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Torontobluejays, Today, 02:01 PM
                    0 responses
                    0 views
                    0 likes
                    Last Post Torontobluejays  
                    Started by Taddypole, 04-26-2024, 02:47 PM
                    3 responses
                    23 views
                    0 likes
                    Last Post eDanny
                    by eDanny
                     
                    Started by Creamers, 04-27-2024, 05:32 AM
                    2 responses
                    20 views
                    0 likes
                    Last Post Creamers  
                    Started by businessman1929, Today, 01:28 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post businessman1929  
                    Started by mattbsea, 04-26-2024, 05:44 PM
                    2 responses
                    19 views
                    0 likes
                    Last Post mattbsea  
                    Working...
                    X