Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Synchronize positions with FB

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

    Synchronize positions with FB

    Hello,

    NT cannot synchronize positions properly with Futures Betting. (In fact I've been told that this is with all FIX based broker APIs)

    It's a pretty bad situation Every time NT is shutdown, or the connection is lost, whether intraday or overnight, on reconnect the position average price is not updated. It's always zero. This is clearly not a limitation of the FIX protocol, but probably one of the API. To synchronize the size and instrument, but not the average price is a pretty half implemented solution. An average price of zero is very annoying, since it means that your PnL is always ridiculous, and trading off a chart is useless since the position marker skews the whole graph massively.

    I realise that this may be a problem in a third party API, but if that is the case would you please urge your supplier to fix this. In the short term, how about allowing manual update of average price?

    thanks
    Dave

    #2
    Hi Dave, thanks for the post, I'll seek clarification on this issue - have you tried adding a manual execution? - http://www.ninjatrader-support.com/H...utionsTab.html

    Comment


      #3
      Thanks for the response.

      How would the execution help? The execution isn't missing - it's received from the broker. I suppose you could close out the position at a commission-factored close to zero price, put another trade in for the correct price, but I'd rather not mess up my list of trades and commission etc. An update of average price would be much easier.

      Dave

      Comment


        #4
        More to the point, 'add execution' doesn't change the position. Maybe it would if you reconnected, but this means adding two executions and restarting twice to solve this. In the meantime your position is live.

        Comment


          #5
          Hi Dave, checked with development on this - please try disconnecting and going to Tools > Options > Misc and Repair your DB. Then reconect and check if the Avg price is updating properly.

          Comment


            #6
            This is utterly ridiculous. Can you give me any rational reason why the (very overused) response of repair the database might be the solution to my problem. I've already spent significant money solely to prove this problem for you and I shouldn't have to spend any more. Why don't you test it? It's totally reproducible.

            I understand how databases can become corrupt (alhtough done properly that should be rare) but in this case, and probably many others there's no indication of a corrupt database situtation, so your suggestion is just not decent support.

            As it happens, I have an open position overnight, so I 'repaired' the db, reconnected, and as was really rather obvious, the problem still occurs.

            Comment


              #7
              Dave, sorry this is not resolved for you - we would suggest starting with a completely fresh database. For this you would need to flatten all open positions and shutting down NinjaTrader. Then go to MyDocuments\NinjaTrader 6.5\db and rename the NinjaTrader.mdb file to NinjaTrader.Old.mdb and restart the software (unfortunately you will loose your saved data and ATM strategies with this step).

              Comment


                #8
                Aaarghhh. No! Reread the whole thread. Please please stop telling me to repair databases and start afresh. Next it's going to be clean re-install of NT.

                Re-read my previous post about rational reasons why I should be repairing databases or starting off afresh. That is not an answer, and I can't believe development's only response was to repair the db. Don't you have anyone who can look at the code???

                Comment


                  #9
                  And here's another thing not synchronised properly

                  2009-05-12 15:09:19:281 (FuturesBetting) Cbi.Order.Update1: oldid='105012352' Order='105012352/N_DAnderson' Name='' New State=Unknown Instrument='6A 06-09' Action=Buy Limit price=0 Stop price=0.7671 Quantity=1 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='Order unrecoverable. Probably cancelled by broker'

                  I happen to know that the broker still has that as a working order. Does this mean that NT has asked FB for the status of the order and received no response, like a timeout?

                  Comment


                    #10
                    Hi Dave, this could even moreso point to a corrupt DB on your end - can you please follow the suggestion in my previous post how to start with a fresh database and then follow up if this help resolving it? Thanks!

                    Comment


                      #11
                      OK, look, I'll do it for you but I guarantee it won't help. What is happening here is that NT is asking FB for positions, but is not updating the average price when it gets the position. You've still entirely failed to give rational reasons why a corrupt database should cause that, and furthermore, a complete refresh of the database is not a solution to this problem.

                      Why can't you just humour me for a while and ask your development team to look at the API and position update to see if

                      a) the average price is retrieved from FB via FIX
                      b) the call you make to the API copies this price into your position update code.

                      Or send the code to me. It'll take 15 mins ;-)

                      Comment


                        #12
                        FB does not provide the AvgPrice of a position -> thus NT has to calculate it from the executions stored in the DB. This could be off (for various reasons).

                        At best flatten all your positions in FB and reset your DB (Tools->Options->Misc->Reset DB) to give it a fresh start. Deleting the DB file as suggest by Bertrand would work as well (but don't forget to flatten your FB account before).

                        Comment


                          #13
                          There are issues between FB and NT, FB should of warned you when you set up the account.
                          From what I can tell other people have had the same problems and have given up trying to get it sorted, I am one of them!

                          Comment


                            #14
                            Originally posted by NinjaTrader_Dierk View Post
                            FB does not provide the AvgPrice of a position -> thus NT has to calculate it from the executions stored in the DB. This could be off (for various reasons).

                            At best flatten all your positions in FB and reset your DB (Tools->Options->Misc->Reset DB) to give it a fresh start. Deleting the DB file as suggest by Bertrand would work as well (but don't forget to flatten your FB account before).
                            The execution is fine. It's there in the executions tab, with the correct price. Does NT go through all executions for the instrument and account? How can I list what they are? There are not very many. Anyway, they all have proper prices. To end up with zero is very unlikely. If something is corrupt in calculating the average price why is there no error message? I really don't believe it's that.

                            You're asking me to flatten my live position, clear the db, connect, do a live trade, disconnect and connect again all to see whether the average price is not zero. With respect, and as I've mentioned earlier in the thread, I don't see why I should have to spend more money to do this testing for you, when I don't have any confidence that this will fix the problem. Can you not test this at your end? Are you 100% sure that there are other clients (or yourselves) that have seen a proper average price on a FB position after reconnect, because if you're not sure then I don't need to spend this money and we need to take a different approach.

                            (samuelhogg - I was made aware of the issues between FB-NT when I moved to that setup. This wasn't one of them. There are major uinimplemented features between the two, but this sort of stuff is half-implemented features. I mean why bother to code the position synch without doing the average price part - I realise that might be FB's API)

                            Comment


                              #15
                              Unfortunately we are not aware of any other way to resolve the issue than proceeding as I suggested in my post below.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              68 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              41 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              24 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              27 views
                              0 likes
                              Last Post TheRealMorford  
                              Started by Mindset, 02-28-2026, 06:16 AM
                              0 responses
                              54 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Working...
                              X