Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug: Incorrect P/L with M6E and IB

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

    Bug: Incorrect P/L with M6E and IB

    By accident I noticed that the P/L calculation is completely incorrect with IB and M6E. This is not the case in Sim Mode but with the live account. The calculation is like -3303 right from the beginning even if the symbol only moved some pips.

    TWS is 917.8 and Nt 7.0.1000.6.

    I may add that the position was not ordered through NT but already in the portfolio. But nonetheless NT should display it correctly...
    Last edited by symphys; 07-13-2011, 10:26 AM.

    #2
    Hello symphys,

    Thank you for your post.

    What value does this show up in TWS?

    Please go to Tools--> Instrument Manager--> locate the M6E and select "Edit".

    From the Instrument Editor, can you please tell me what your tick size and Point value is set to for this instrument?
    MatthewNinjaTrader Product Management

    Comment


      #3
      The P/L calc is correct in TWS and the entries in the Instrument Manager are fine: TickSize: 0,0001, Pointvalue: 10.000,00


      This is from the trace logs. I deleted the personal stuff:
      Code:
      Cbi.ExecutionEventArgs.Process: Execution='M6E 09-11/' Instrument='M6E 09-11' Account='' Exchange=Globex Price=1,4357 Quantity=1 Market position=Long Operation=Insert Order='' Time=''
       
      IB.AccountUpdatesRequest.ProcessPortfolioUpdate: instrument='M6E' secType='FUT' account='' size=1 averageCost=17947,28 marketPrice=1,43560005
      Cbi.Connection.ProcessEventArgs.PositionUpdateEventArgs1: Instrument='M6E 09-11' Account='' Avg price=1,794728 Quantity=1 Market position=Long Operation=Insert Currency=UsDollar
      Cbi.PositionUpdateEventArgs.Process: Instrument='M6E 09-11' Account='' Avg price=1,794728 Quantity=1 Market position=Long Operation=Insert Currency=UsDollar
      The averagCost divided by TickSize is not the correct Avg price...

      Comment


        #4
        In order for me to help determine why this is occurring, I will need to review your entire log and trace files from the last date that this occurred.

        Please send an email to support[at]ninjatrader[dot]com and include your most recent log and trace files, Attn: Matthew in the Subject line and a reference to this thread.

        You will find the log file in the Documents > NinjaTrader 7 > Log folder.
        • The log file will be named ‘log.20110713.txt’


        You will find the trace file in the Documents > NinjaTrader 7 > Trace folder.
        • The trace file will be named ‘trace.20110713.txt’


        Please attach both of these files to your next response. If these files are over 4MB, please let me know and I can respond with alternative instructions.
        MatthewNinjaTrader Product Management

        Comment


          #5
          I'm very sorry but I will not send those files as the contain too much private information. Above lines are the best I can do.

          If you can reproduce this on your own then you don't need the files. As mentioned this was just discovered by accident as I'm not trading the micro anyway. Sorry...


          These are the log lines:
          Code:
          Order='' Name='External' New state=Working Instrument='M6E 09-11' Action=Buy Limit price=1,436 Stop price=0 Quantity=1 Type=Limit Filled=0 Fill price=0 Error=NoError Native error=''
          Order='' Name='External' New state=Filled Instrument='M6E 09-11' Action=Buy Limit price=1,436 Stop price=0 Quantity=1 Type=Limit Filled=1 Fill price=1,4357 Error=NoError Native error=''
          Execution='M6E 09-11/' Instrument='M6E 09-11' Account='' Exchange=Globex Price=1,4357 Quantity=1 Market position=Long Operation=Insert Order='' Time=''
          Instrument='M6E 09-11' Account='' Avg price=1,794728 Quantity=1 Market position=Long Operation=Insert Currency=UsDollar
          Last edited by symphys; 07-13-2011, 10:08 PM.

          Comment


            #6
            symphys,

            Thank you for reporting. We will need to try and replicate on our end in that case.

            If any new information develops here, I will update this thread.
            MatthewNinjaTrader Product Management

            Comment


              #7
              As with some other problems I posted this thread was never updated. The problem remains in the newest version of NT.

              Comment


                #8
                Hello symphys,

                Thanks for checking in.

                If you are still experiencing the incorrect PnL witht he M6E, can you pleaes recreate your database.

                Please rename your database with the following steps :
                • Shutdown NinjaTrader and Go to the Start Menu
                • Select My Documents--> NinjaTrader 7--> DB--> NinjaTrader.SDF.
                • Right click on NinjaTrader.SDF and select "Rename." *Name it "OLDNinjaTrader.SDF."
                • Then restart the software and NinjaTrader will create a fresh database file to use
                • Unfortunately the following items stored in the old database will be lost – ATM Strategy templates, Session templates, Instrument Lists / Custom Instruments and historical trade execution data

                To prevent running into situations where you can potentially lose important data, we advise to run regular backups via our inbuild backup feature in NinjaTrader - http://www.ninjatrader.com/support/helpGuides/nt7/creating_a_backup_archive.htm



                Please let us know if you see this moving forward on the new database.
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  This didn't fix the problem. Still getting an unresonable price in the chart.

                  Here are some lines from the trace.log while starting NT with the new database:

                  Code:
                  IB.ExecutionsRequest.Process: id='' instrument='M6E' exchange='GLOBEX' expiry='01.12.2011 00:00:00' sectype='FUT' orderid='' account='' filled=1 price=1,3522 side='BOT' permId='' liquidation=0
                   
                  Cbi.Connection.ProcessEventArgs.PositionUpdateEventArgs1: Instrument='M6E 12-11' Account='' Avg price=1,690353 Quantity=1 Market position=Long Operation=Insert Currency=UsDollar
                   
                  IB.AccountUpdatesRequest.ProcessPortfolioUpdate: instrument='M6E' secType='FUT' account='' size=1 averageCost=16903,53 marketPrice=1,35220005
                  Although it seems the price from TWS is correct the lines afterwards suggests that NT will change the entry price to the averageCost reported by IB. Should be marketPrice though.
                  Last edited by symphys; 11-21-2011, 04:40 PM.

                  Comment


                    #10
                    Hello,

                    I have been unable to reproduce this using a paper account.

                    Can you please double check your Instrument settings for the M6E? Please go to Tools--> Instrument Manager--> Edit Instrument.

                    Please ensure the settings are correct as per the CME specs:

                    Find information for Micro EUR/USD Futures Contract Specs provided by CME Group. View Contract Specs


                    Tick Size: 0.0001

                    Point Value: 12,500

                    Please let me know if you needed to make any changes in this area.
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      Ah nice this fixed the problem. I did have Point Value of 10000.

                      Although I have the latest NT version .7 the Point Value in Instruments.txt is 10000 for M6E. And for other Micros there are also wrong values...

                      Checking 2 different installs of NT is this Instruments.txt not updated? The latest version is installed but 2 different txt files are in the db folder...
                      Last edited by symphys; 11-21-2011, 05:38 PM.

                      Comment


                        #12
                        Hello,


                        Thanks for reporting and I'm glad to hear that did the trick.

                        I will review this symbol/point value as well as the other micros and see if this needs to be corrected
                        MatthewNinjaTrader Product Management

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by andrewtrades, Today, 04:57 PM
                        1 response
                        8 views
                        0 likes
                        Last Post NinjaTrader_Manfred  
                        Started by chbruno, Today, 04:10 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post chbruno
                        by chbruno
                         
                        Started by josh18955, 03-25-2023, 11:16 AM
                        6 responses
                        436 views
                        0 likes
                        Last Post Delerium  
                        Started by FAQtrader, Today, 03:35 PM
                        0 responses
                        7 views
                        0 likes
                        Last Post FAQtrader  
                        Started by rocketman7, Today, 09:41 AM
                        5 responses
                        19 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Working...
                        X