Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unexplicable trade

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

    Unexplicable trade

    Hi Ninjas,

    Continuing to evaluate, debug and watch systems detail, I found out this non-sense trade ( fortunately in the Sim101 account ), but I'd like to post it here in order to know if it's cause some bug in the simulation account Sim101, or cause it could really happen due to technical dynamics.

    It's simple: My Strategy submit a buy order at 8:36:31, executing it at 1.1406'5. The weird thing is the Ask at that exact time was at 1.1404, even before it wasn't ever at 1.1406'5. The order statement is:

    lEntryOrder = SubmitOrder(0, OrderAction.Buy, OrderType.Limit, (quantity-Position.Quantity), (GetCurrentBid()+TickSize), 0, "", "LONG");

    so:

    What is the reason for this trade if it is filled with a limit order?

    I've attached two charts, setting them to a timeframe of one tick in order to visualize it better



    Keeping forward for answers here

    Thanks
    Attached Files
    Last edited by pstrusi; 10-15-2015, 07:08 AM.

    #2
    Hello pstrusi,

    Thank you for your post.

    Seems the chart is not in sync with the timestamped data. Have you attempted syncing your PC clock, restarting NinjaTrader and checking the charts again?

    You can do this with the instructions below:
    • Close NinjaTrader.
    • Click on the clock in the lower right corner of your desktop.
    • Press 'Change time zone...'.
    • Set the Time zone and press 'OK'.
    • Click on Internet Time tab.
    • Set the server to time.nist.gov and then click Update.

    Comment


      #3
      Hi Patrick,

      As you may notice, the important timestamp data is what are shown and the both charts that I've put. I can see the confusion comes to the time when the jpg.file were created ( i live in europe ) now in order to show them here. In fact to clear the subject, my pc's time is set to US E.T, so that's not the problem.

      The problem has other reason that I can't still figure it out, please take a better look

      Comment


        #4
        pstrusi,

        No confusion on the time of the chart. This is seen with unsynced time clocks - which NinjaTrader uses. I was checking to see if you had already performed a sync and restarted NinjaTrader, if you have not I would recommend doing so.

        If you have or when you complete it and if the stamp is still in correct, send us your database to platformsupport[at]ninjatrader[dot]com with this thread in reference: "http://ninjatrader.com/support/forum/showthread.php?t=79254"

        You can do this by going to Help > Mail To Support. Ensure the database option is enabled.

        Make sure to try the time sync first if you have not already.

        Comment


          #5
          I'll consider your suggestions, right now I'm under heavy painful debugging process.

          Thanks for your attention

          Comment


            #6
            Hi Patrick,

            Still I've not been able to perform the "Sync Time clocks", however, I've seen two more weird ones, as you can see in the jpgs attached.

            1. I opened an Ask chart and it pops like you can see. It opened at the same time of my pc clocks,
            however with no the actual prices, despite prices were flowing in, suddenly it adjusted itself.

            2. One again a Short trade done way lower than the bid at that time.

            I hope that this issues can be solved with that sync, but I begin to suspect that there's something wrong with my database functioning.

            Do you have another suggestions, either to check or debugging it? For example, the typical step of going to the datafile in the folder system, rename the actual adding "old", and restarting Ninjatrader in order to create a new one could help?

            Thanks
            Attached Files

            Comment


              #7
              Originally posted by pstrusi View Post
              Hi Patrick,

              Still I've not been able to perform the "Sync Time clocks", however, I've seen two more weird ones, as you can see in the jpgs attached.

              1. I opened an Ask chart and it pops like you can see. It opened at the same time of my pc clocks,
              however with no the actual prices, despite prices were flowing in, suddenly it adjusted itself.

              2. One again a Short trade done way lower than the bid at that time.

              I hope that this issues can be solved with that sync, but I begin to suspect that there's something wrong with my database functioning.

              Do you have another suggestions, either to check or debugging it? For example, the typical step of going to the datafile in the folder system, rename the actual adding "old", and restarting Ninjatrader in order to create a new one could help?

              Thanks
              Regarding to Issue # 1:
              I've just realized what is really happening regarding to those weird fillings, it's pretty easy. At that scale so fast of 1 tick scale, there will be always a "distance" cause the time that will have between NT triggers and submits the order, and the time when it's really filled. Pretty logic, I didn't see it before.

              Regarding to Ask chart problem, I have no answers
              Last edited by pstrusi; 10-16-2015, 10:17 AM.

              Comment


                #8
                Thank you, pstrusi.

                I will review and follow up with you on this.

                Comment


                  #9
                  Hi Patrick,

                  1. I did the Clock-sync today. However, since at yesterday close I noticed a weird behaviour in my NT data flow and for a better "debugging" process I decided to "reset" my database by the typical procedure of renaming as Old the current one and reinitiating and I've found out a couple of weird events:
                  - suddenly the size of the Old one is 50% bigger than new created, why?
                  - I've lost the last 15 minutes of yesterday's data, why?

                  2. As you can see in the attached chart, I've a data interruption in mi NT database, despite there was not any connection loss of my broker data flow, why? Does this happen cause the database reset?

                  3. How did you know that I actually didn't clock-sync my local Ninjatrader system ? I understand about restarting cause it's registered in your systems, but what about the sync? Is it mt local NT system info so openly to be checked ? I thought it was not
                  Originally posted by NinjaTrader_PatrickH View Post
                  pstrusi,

                  ..........This is seen with unsynced time clocks - which NinjaTrader uses. I was checking to see if you had already performed a sync and restarted NinjaTrader, if you have not I would recommend doing so..........
                  Thanks
                  Attached Files
                  Last edited by pstrusi; 10-19-2015, 04:58 AM.

                  Comment


                    #10
                    Hello pstrusi,

                    I do not have specific answers to these. I would ask you to send us a note at platformsupport[at]ninjatrader[dot]com so we may schedule a support call with you to go over these items on your PC via remote (if possible).
                    Please reference this thread in your e-mail: 'http://ninjatrader.com/support/forum/showthread.php?t=79254'

                    Comment


                      #11
                      Hi Patrick,

                      Let me set a questions where you ( NT support team have great experience ) and are able to answer:

                      1. When anyone resets its database by renaming it ( in its folder ) as "NinjatraderOLD", and initiate NT again, in order to build a fresh database, does it exist risk that some PRICE data could be lost?

                      2. How can you check in my system if I have already did a time-sync? ( that's something that you know cause you wrote it ) I want to be honest: I don't like people digging into my system, please make clear this point

                      I don't really care for past friday data lost, so I don't think it's necessary a support call and even less an access to my PC via remote to dig into my system.

                      In case that you're not able to answer, please consult it with your support team fellows

                      Thanks for your attention

                      Comment


                        #12
                        Hello pstrusi,

                        Thank you for your response.

                        Let's start with your response from the 17th.
                        1. I do not fully understand what you attempted to detail here. So, was it that the old database grew in size? Or that is larger than the new database?
                          And the data was likely due to the fact that that data was in the cache and not stored as historical data.
                          With just these two items, it sounds like you are running into several installation issues.
                        2. Database reset means you were disconnected from the market. However, the data feed should have downloaded the necessart data.
                        3. The Time data of your PC is not open to be viewed. I was looking for confirmation of you following the troubleshooting steps laid out here.


                        Next we will look at your latest questions.
                        1. No, this should not have occurred. I suspect something deeper thatn just the database.
                        2. Perfectly acceptable.


                        So let us start here; please shut down NinjaTrader -> go to the following directory on your PC: (My) Documents\NinjaTrader 7\db -> delete the 'cache' folder in the 'db' folder. This will clear any corrupted data that should have only been temporary chart data but could have been corrupted. You do not need to worry about removing this folder as it is recreated on restart of NinjaTrader and should only ever hold temporary data for the current session.

                        If you see the same issue still, then please go to Tools -> Options -> Data -> and advise the following:
                        • Is 'Get data from server' enabled?
                        • Is 'Save chart data as historical' enabled?
                        • In addition, please advise who you connect to for data.

                        Comment


                          #13
                          Thanks Patrick for you elaborated answer, you've cleared several doubts. Now let me address to your questions:

                          So, was it that the old database grew in size? Or that is larger than the new database?
                          The only fact that I can tell is that OldDatabase is actually 50% larger than new one created fresh

                          With just these two items, it sounds like you are running into several installation issues.
                          The last NT version installation was installed successfully without any "notice" or any issue, so: how could I know if actually there was any?

                          Is 'Get data from server' enabled?
                          Yes. Do you have some sugestions here in order to prevent price data loss?

                          Is 'Save chart data as historical' enabled?
                          Of course, always since I connect to Interactivebrokers as data provider

                          Comment


                            #14
                            Hello pstrusi,

                            Thank you for your response.

                            I would suspect the cache item as I mentioned right now as far as what I meant by "installation issues".

                            I would leave 'Get data from server' enabled. The 'Save chart data as historical' option would be ideal for Interactive Brokers as the historical tick data is not provided.
                            This also explains the gap from when you reset your database and restarted NinjaTrader. There would be no way to download historical tick data from Interactive Brokers for the gap in data.

                            Comment


                              #15
                              Thanks Patrick, for the answer and suggestions.

                              I think you're totally right regarding to the cache issue, cause before I reset the database, I clear that folder, so that explains why the price data loss, I thought the data was immediately written to the database; now I'm aware of this for future events, if any.

                              Regards,
                              PS

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              237 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              382 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Started by oviejo, Today, 12:28 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post oviejo
                              by oviejo
                               
                              Started by pechtri, 06-22-2023, 02:31 AM
                              10 responses
                              125 views
                              0 likes
                              Last Post Leeroy_Jenkins  
                              Started by judysamnt7, 03-13-2023, 09:11 AM
                              4 responses
                              59 views
                              0 likes
                              Last Post DynamicTest  
                              Working...
                              X