Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Loading Past Trades

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

    Loading Past Trades

    I think it's a new feature to NT8 that the system will load executions for the current day that occurred while NT was not connected to the account. It will build trades in the performance monitor for which it has the open and the close of the position. I'm connected using IB Gateway.

    Do I have this right?

    Is it possible to get the system to load trades that occurred for the past week or month. Perhaps there is a class method which can be triggered?

    Thanks,

    Rich

    #2
    Originally posted by richtobey View Post
    I think it's a new feature to NT8 that the system will load executions for the current day that occurred while NT was not connected to the account. It will build trades in the performance monitor for which it has the open and the close of the position. I'm connected using IB Gateway.

    Do I have this right?

    Is it possible to get the system to load trades that occurred for the past week or month. Perhaps there is a class method which can be triggered?

    Thanks,

    Rich
    This is very important to me as well. Currently I must read historical executions from SQL, but I'm hoping NT 8 will expose them.

    Comment


      #3
      I did the same thing. Problem is, if the strategy stops for some reason, NT is closed or has a dropped data feed and an exit occurs, the other half of the trade doesn't get logged. This happens with NT and with my own solution.

      Though with add-ins in NT8 I suppose it's possible to write something to talk to the broker (in my case Interactive Brokers) directly and then add the missing trades to NT8 db. I've dug around to see that there is an interface for this.

      Comment


        #4
        Historical load from IB past 24 hours not possible

        Originally posted by dalebru View Post
        This is very important to me as well. Currently I must read historical executions from SQL, but I'm hoping NT 8 will expose them.
        I appears it's not possible on IB via the api.

        Interactive Brokers complete API documentation. Encompassing Trader Workstation (TWS) API, Client Portal API, Excel API and more.


        Perhaps an import feature from a text file would be best.

        Comment


          #5
          Sorry for not putting this all in one post. It's been a work in progress. But ! ...

          For purposes of loading past trades on the IB platofrm, open TWS > Classic TWS (At bottom), Account > TradeLog> Show Trades > All. Then disconnect the NT8 and reconnect. NT8 setup guide will tell you how to connect NT8 to TWS. After reconnect, all trades for the last week are there.

          I use IB Gateway for regular connection though because it stays up 24/7.

          Rich

          Comment


            #6
            Hello Rich and Dale,

            This would actually perform as it would in NinjaTrader 7. Where execution updates will be received from the API you are connected to, but previous/historical trades outside of NinjaTrader would not be loaded.

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              Hello Rich and Dale,

              This would actually perform as it would in NinjaTrader 7. Where execution updates will be received from the API you are connected to, but previous/historical trades outside of NinjaTrader would not be loaded.
              I'm puzzled, though, that you would bother to store executions in the sdf database never to be accessed, nor to be accessible, forever after...

              Comment


                #8
                Originally posted by NinjaTrader_PatrickH View Post
                Hello Rich and Dale,

                This would actually perform as it would in NinjaTrader 7. Where execution updates will be received from the API you are connected to, but previous/historical trades outside of NinjaTrader would not be loaded.
                NinjaTrader_PatrickH,

                Try it. You will see the the procedure I outline below is loading executions that occurred while NT8 was closed or not connected to the API. You'll have to create some transactions in IB while NT8 is closed. Or you could create the transactions, reset the database, reconnect to the datasource, and presto they are there for the last day or week depending upon how you do it.

                Rich

                Comment


                  #9
                  Originally posted by dalebru View Post
                  I'm puzzled, though, that you would bother to store executions in the sdf database never to be accessed, nor to be accessible, forever after...
                  I'm almost certain these can be accessed from a strategy. In my case, I'm storing a bunch of extra data along with my trade. I use this info in my strategy. So I'm not sure this totally helps me. I really like the way NT8 properly calculates executions from the trades. NT7 had errors with regard to currencies conversions on forex instruments. Also, when an execution occurred outside of NT it would totally mess up the performance queries. So the fact that NT8 loads the missing trades is very helpful.

                  Comment


                    #10
                    Hello Rich,

                    So are you looking at the Strategy Performance or the Trade Performance?

                    Are these orders that were submitted from NinjaTrader and filled while NinjaTrader was shut down or submitted and filled with NinjaTrader shut down?

                    Comment


                      #11
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello Rich,

                      So are you looking at the Strategy Performance or the Trade Performance?

                      Are these orders that were submitted from NinjaTrader and filled while NinjaTrader was shut down or submitted and filled with NinjaTrader shut down?
                      Trade performance. Ninjatrader was not connected when the orders or executions happened.

                      Rich

                      Comment


                        #12
                        Hello richtobey,

                        I am still trying to re-produce this as it is unexpected behavior. Thank you for your patience.

                        Comment


                          #13
                          Patrick,

                          I have a feature request about this. Simply expose a method that returns all of the executions history for an account, perhaps limited to a date range. The data is in your sdf database, so I don't see why we shouldn't be able to access them easily, not do I see why they should be ignored by Trade Performance just because a restart of NT loses them on trades held overnight.

                          Thanks,
                          Dale

                          Comment


                            #14
                            Hello Dale,

                            Thank you for the suggestion.

                            Comment


                              #15
                              Any update on feature of getting past trades into NT database ?
                              Or is there a work around solution available?
                              Please advice, thank you.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by burtoninlondon, Today, 12:38 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post burtoninlondon  
                              Started by AaronKoRn, Yesterday, 09:49 PM
                              0 responses
                              11 views
                              0 likes
                              Last Post AaronKoRn  
                              Started by carnitron, Yesterday, 08:42 PM
                              0 responses
                              10 views
                              0 likes
                              Last Post carnitron  
                              Started by strategist007, Yesterday, 07:51 PM
                              0 responses
                              12 views
                              0 likes
                              Last Post strategist007  
                              Started by StockTrader88, 03-06-2021, 08:58 AM
                              44 responses
                              3,982 views
                              3 likes
                              Last Post jhudas88  
                              Working...
                              X