Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TWS and NT strategy working problem

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

    TWS and NT strategy working problem

    Hallo.
    I have trading acc in IB and use TWS to connect to data feed. I'm trading MHI with TWS.
    TWS and NT and automate strategy working well untill any problems with connection happend.
    Sometimes connection is broken for few seconds (probably my ADSL provider change my connection IP address ) and NT reconnect connection within few second and everything looks OK but after it happend strategy ignore trading signals or place only position order without stop loss and stop limit. Everything back to working well if I manually reload strategy.
    The same trategy works well and do not need restart if I trade emini with Zen-Fire where also brocken connestions event happend many time.
    I have no idea how to locate problem and how to fix it. I can't leave computer unattendent now.
    Maybe there is any way to programme strategy to reload it self after receconect or other way to resolve the problem???
    Rgds
    Czarek

    #2
    See OnConnectionStatus() method: http://www.ninjatrader-support.com/H...ionStatus.html

    This is for experienced programmers. You can program in how to handle disconnects.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh.
      Thanks for quick reply.
      Where can I find more code samples ??
      Rgds
      Czarek

      Comment


        #4
        You could check here: http://www.ninjatrader-support.com/v...splay.php?f=30

        Comment


          #5
          Josh.
          I trying to find sampes about OnConnectionStatus()
          but I can't find. Could you give exact link?
          Czarek

          Comment


            #6
            If you can't find anything in the link provided below, then unfortunately there are no further examples available.

            Comment


              #7
              Josh.
              I trying to base no sample from help. Can you tell me the syntax of reload strategy command??
              Code I'm trying to develope should reload strategy during reconnecting.
              I think it should be something like that:
              if (dataFeed != ConnectionStatus.Connecting)
              {
              // Do something
              }
              Question is what to wright instead "// Do something"
              Czarek

              Comment


                #8
                Unfortunately there is no "reload strategy" command available.

                Comment


                  #9
                  Josh.
                  So maybe exitstrategy and than enter strategy??
                  Czarek

                  Comment


                    #10
                    Unfortunately you can't enter a strategy by NinjaScript.

                    Comment


                      #11
                      Can you advise me any solution for my problem??
                      Rgds
                      Czarek

                      Comment


                        #12
                        You would need to code your strategy so it placed orders as the connection is established/recovered.

                        Another option would be getting a more stable internet connection by e.g. checking out a different ISP.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Tim-c, Today, 03:54 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post Tim-c
                        by Tim-c
                         
                        Started by FrancisMorro, Today, 03:24 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post FrancisMorro  
                        Started by Segwin, 05-07-2018, 02:15 PM
                        10 responses
                        1,771 views
                        0 likes
                        Last Post Leafcutter  
                        Started by Rapine Heihei, 04-23-2024, 07:51 PM
                        2 responses
                        31 views
                        0 likes
                        Last Post Max238
                        by Max238
                         
                        Started by Shansen, 08-30-2019, 10:18 PM
                        24 responses
                        945 views
                        0 likes
                        Last Post spwizard  
                        Working...
                        X