Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Duplicated trades in 'Trade performance' after rollover

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

    Duplicated trades in 'Trade performance' after rollover

    So, Friday this report was fine. Sunday, I'm checking some stats and lots of trades from this week, after I did the rollover (not sure if that is connected) are duplicated. The database IS NOT corrupt (I'm a developer and I checked it with third party tools). Please see attachment.

    NT 8.0.12.0 64-bit (Standard

    What gives?

    [edit] - Every time I close and re-open ninjatrader, it adds extra trades! Good thing is, my profits going up! Bad thing is, it's not real! What the hell is going on?

    Have ninja running now: Number of trades for period stated @ 626. Shut down ninjatrader (it 'stopped working' on shutdown, but it very often does that). Restart ninjatrader. Report still on desktop with same date period. Click generate. Now have number of trades reported @692!

    NT app behaviour/bugs get weirder and weirder!

    How to fix please? Without loosing all my data (I don't want to reset the database which I am sure will be a standard response!).
    Attached Files
    Last edited by pjsmith; 03-11-2018, 03:47 AM.

    #2
    OK, looking at the logs further, and hope this helps you resolve it in NT.

    I use IB. When NT is connecting to IB, it is doing a lot of these

    2018-03-11 09:45:24:410 (ib) IB.Adapter.OnExecution: requestId=201
    2018-03-11 09:45:24:410 (ib) IB.Adapter.OnExecution: requestId=201

    and these

    Cbi.Account.ExecutionUpdateCallback: executionId=

    And these are being stored as new trades?

    For example, per the image shown in the previous post, the associated trade

    2018-03-11 09:45:24:518 (ib) IB.Adapter.OnExecution0 instrument=xxxxxx 03-18
    2018-03-11 09:45:24:518 (ib) Cbi.Account.ExecutionUpdateCallback: executionId='xxxx 03-18/00011d8a.5a9fbc09.01.01' account='xxxxx' instrument='xxxxx03-18' exchange=Eurex price=xxxx quantity=1 marketPosition=Short operation=Add orderID='147877949' isSod=False time='2018-03-07 14:56:48' statementDate='2018-03-07'
    2018-03-11 09:45:24:519 (ib) IB.Adapter.OnExecution0 instrument=xxxx 03-18


    NT needs to known these are trades that have already been executed and stored in the database. Should the order ID not be checked/be a unique key to prevent this? Though why it has suddenly started happening I am not sure. I don't normally fire IB up on the Sunday though, so perhaps this issue has been there some time.

    So, fix required I think, and a way to delete the duplicates added without clearing the real trades? Perhaps a cleanup for duplicate ID's if that data is stored in the database?

    Comment


      #3
      Here is another example, showing the duplicated NT order ID's and trades

      NT does seem to be downloading them and storing them from IB TWS each time it starts


      One more thing that might be relevant. The 'show trades for' in the 'trades' window on IB TWS. If you are trying to replicate, try setting this to 1 week so there are more than todays trades shown. May be of relevance. In any case, NT should be checking for duplicates is this is the source of the issue. Very easy to do based on the transaction ID.

      The more I think about this issue, the more my explanation makes sense. Although I often load NT on weekends, I rarely have IB TWS open also, so this is one of the few occasions where I have it running and NT connects to it (excepting the normal trading hours of course)
      Attached Files
      Last edited by pjsmith; 03-11-2018, 04:42 AM.

      Comment


        #4
        And confirmed. Loading, unloading and restarting ninjatrader WITHOUT ib tws running, the trades are not downloaded again and no further duplication occurs.

        FWIW, I managed to restore my Ninjatrader.sdf from a backup taken yesterday, so I am good again, but the bug needs fixing for next time and others. I have not tested this intraday, but I suspect it does not happen in that case as I have had NT quit on me, or loaded and unloaded it during normal hours many times and not experienced this issue (or not that I have noticed)

        Comment


          #5
          Hello,

          Thanks for writing in.

          I'd like to retrieve your log and trace files and your database file so that we can test this item further.

          You can do this by going to the Control Center-> Help-> Email Support

          Expand 'Other files' and enable 'Database file'.

          Please include a link to this forum post in the body of your email.

          I look forward to your reply.
          Alan S.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_AlanS View Post
            Hello,

            Thanks for writing in.

            I'd like to retrieve your log and trace files and your database file so that we can test this item further.

            You can do this by going to the Control Center-> Help-> Email Support

            Expand 'Other files' and enable 'Database file'.

            Please include a link to this forum post in the body of your email.

            I look forward to your reply.
            Hello,

            I have exactly the same issues. Could you please share if this was resolved and how? Thank you

            Comment


              #7
              Hello Adilius,

              Thank you for the post.

              I see that you are currently working with a colleague of mine on a resolution for your inquiry.

              I would continue to work with him on this item, as this particular case was 2 years ago and the platform has had many upgrades and fixes since this occurred.

              We look forward to resolving your inquiry.
              Melissa J.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by kujista, Today, 06:23 AM
              4 responses
              13 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by traderqz, Yesterday, 09:06 AM
              2 responses
              15 views
              0 likes
              Last Post traderqz  
              Started by traderqz, Today, 12:06 AM
              3 responses
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by RideMe, 04-07-2024, 04:54 PM
              5 responses
              28 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by f.saeidi, Today, 08:13 AM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X