Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MBT disconnects from order server

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

    #16
    Max,

    If you can send me a PM at vincent at ninjatrader dot com and refer to this post, I will forward your information to our development team.


    Vince
    Vince B.NinjaTrader Customer Service

    Comment


      #17
      Fiberangel, How often do you get disconnects? Naturally, after my first post I stayed connected all day long for several sessions, until today. I walked in to my computer room to find that njt got dis-connected and had been trying to re-connect for the last half hour or so. Dis-connected manually and tried to re-connect but njt said I had to re-start first.

      Comment


        #18
        Originally posted by dtf139 View Post
        Fiberangel, How often do you get disconnects? Naturally, after my first post I stayed connected all day long for several sessions, until today. I walked in to my computer room to find that njt got dis-connected and had been trying to re-connect for the last half hour or so. Dis-connected manually and tried to re-connect but njt said I had to re-start first.
        NT reports a temporary loss of connection as MBT Navigator reports this to NT. MBT Navigator then tries to reconnect. If it fails (as in your case) then NT will not report back connected and you need to restart NT (as you did).

        Comment


          #19
          Originally posted by fiberangel View Post
          Vince,

          I'm a developer myself, and I have written a couple of apps that use MBT SDK. I can tell you that my code doesn't have problems connecting/reconnecting to MBT. I do see disconnects from MBT servers as I log it, but I ALWAYS reconnect. What sucks about loosing connection to MBT from NT is that if it happens when I'm away from my PC, I loose the data in my charts and then when I restart it, I have huge gaps. Needless to say that backtesting on that data is useless. This would prevent me from running an automated strategy in NT with MBT.

          I can share my code (C#) with your developers so that you can take care of reconnects. I think it would help everyone.

          Regards,

          Max
          Can you please send your NT logs and traces (Help->Mail to support) to " dierk AT ninjatrader DOT com" so could take a look? Thanks

          Comment


            #20
            Can someone explain to me in layman terms why you have to re-start nt when you either get disconnected or disconnect manually from MB trading?

            Comment


              #21
              This is an internal restriction of the MBT API.

              Comment


                #22
                Is this true for all of the supported brokers? If not, could you please tell me which ones so that I can start researching them?

                Comment


                  #23
                  These broker technologies you only can connect once to and after manual disconnect you would need to restart NT: MBT, TT, Patsystems

                  Note: a temporary loss of connection will not disconnect you, but NT will try to maintain the connection (true for any broker technology) -> no issue there.

                  Comment


                    #24
                    Today I found out the hard way that using an indicator based stop is not a good idea in NT

                    Comment


                      #25
                      dtf
                      You're half right ... NT will stop the running strategy when an internet or other connection problem causes more than a short temporary disconnect. And its worse for some broker connections than others. (not NT's fault!)

                      This 're-sync' on connect issue is a serious limitation that hopefully will be fixed in some future release.

                      In the mean time.. you can alter your strategy to use stop-loss orders based on your indicator. For example, lets say you want to trail a stop based on a Moving Average or some ATR based stop. You would re-issue the stop-loss using the indicator price (not ticks) at the start of each bar. This way your 'stop' is always in the market, and you do not depend on NT or the internet to 'always be there'.


                      You can't do this using the wizard, but it is possible with regular ninjascript code. See http://www.ninjatrader-support.com/v...ead.php?t=3222 for an example.

                      The key to remember is to reset your initial stop order when you are 'flat' .. Otherwise new trades will use stops based on your prior trade .. not the new trade.



                      (of course this doesn't work if your indicator is not price based, like a CCI etc But even in this case you could use the indicator based stop, or NT's built in trail-stop with a larger value to ensure you are not left totally exposed.) ..

                      Comment


                        #26
                        zoltran,

                        I was trying a stop based on a moving average today. Had been using a % trailing stop based on atr but since I'm limited to what's available in the wizard I had to set the stop the night before and wasn't having too much luck finding a good balance.

                        I realize it might not necessarily be NT's fault but there sure is a lot of room for improvement with the MBT connection.
                        According to my log I lost connection with MBT at 10:31am today. NT was still trying to connect at 12:15 when I finally disconnected manually and shutdown NT. I then logged in using MBT Navigator and closed out my position. Thats the irksome part. Everytime NT has these connection problems I can shut NT down and instantly log into MBT using Navigator. To my non-programming mind that seems to imply that there isnt a long lasting server problem on MBT end.

                        I like the idea of using a trailing stop based on the moving average. Will take a look at tackling the code this weekend when I have more free time. I think right now I will still try using the moving average stop but also combine it with a % trailing stop that is set a further distance so that I have some protection from disconnects.
                        Last edited by dtf139; 01-29-2008, 03:09 AM.

                        Comment


                          #27
                          I don't want to start the argument here, but I run my custom software along with NT connected to MBT on the same box and every time I loose connection to MBT in NT, I stay connected in my custom software (it just reconnects and it tries to reconnect until successful). I've sent my code to NT developers but was told that my connection algorithm is not up to MBT spec. Whether it's true or not is a different topic. What I do care is that I stay connected to MBT servers.

                          Regards,

                          Max



                          Originally posted by dtf139 View Post
                          zoltran,

                          I was trying a stop based on a moving average today. Had been using a % trailing stop based on atr but since I'm limited to what's available in the wizard I had to set the stop the night before and wasn't having too much luck finding a good balance.

                          I realize it might not necessarily be NT's fault but there sure is a lot of room for improvement with the MBT connection.
                          According to my log I lost connection with MBT at 10:31am today. NT was still trying to connect at 12:15 when I finally disconnected manually and shutdown NT. I then logged in using MBT Navigator and closed out my position. Thats the irksome part. Everytime NT has these connection problems I can shut NT down and instantly log into MBT using Navigator. To my non-programming mind that seems to imply that there isnt a long lasting server problem on MBT end.

                          I like the idea of using a trailing stop based on the moving average. Will take a look at tackling the code this weekend when I have more free time. I think right now I will still try using the moving average stop but also combine it with a % trailing stop that is set a further distance so that I have some protection from disconnects.

                          Comment


                            #28
                            Software stays virtually "connected" as you decide to not process the MBT "health update" events (and indicate "connection loss") as advised by MBT.

                            Also: I failed to understand where in your code you reconnect as part of the "health update" handling. Would be great if you could point me again into the right direction in a mail. Thanks

                            Comment


                              #29
                              It is definatly possible to stay connected to MBT. Other software-developers (like Tickquest/Neoticker) are able to do it too.

                              MBT Fx servers for example have 2 scheduled downtimes per day. Not handling these issues will make 24/7 autotrading or data-collecting a futile exercise.

                              Even i as a hobby-programmer was able to archieve this in my personal mbt API-project for data-collecting.

                              P.S.: it is not neccesarry to handle the healthupdate events by yourself, since the MBT Navigator COM-components will autmatically try to reestablish connection every 30 seconds or so by them selfs. I handle them only for logging and status-display and can stay connected 24/7.
                              Last edited by pippi; 01-31-2008, 12:23 PM.

                              Comment


                                #30
                                >> P.S.: it is not neccesarry to handle the healthupdate events by yourself, since the MBT Navigator COM-components will autmatically try to reestablish connection every 30 seconds or so by them selfs. I handle them only for logging and status-display and can stay connected 24/7.
                                Correct, no need to take action apart from indication the temporary loss of connection, and that's what NT does.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Rapine Heihei, Today, 07:51 PM
                                0 responses
                                3 views
                                0 likes
                                Last Post Rapine Heihei  
                                Started by frslvr, 04-11-2024, 07:26 AM
                                5 responses
                                96 views
                                1 like
                                Last Post caryc123  
                                Started by algospoke, 04-17-2024, 06:40 PM
                                6 responses
                                49 views
                                0 likes
                                Last Post algospoke  
                                Started by arvidvanstaey, Today, 02:19 PM
                                4 responses
                                11 views
                                0 likes
                                Last Post arvidvanstaey  
                                Started by samish18, 04-17-2024, 08:57 AM
                                16 responses
                                61 views
                                0 likes
                                Last Post samish18  
                                Working...
                                X