Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need Help With Re-connection Settings for Strategies

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

    Need Help With Re-connection Settings for Strategies

    I'm having trouble getting the settings correct so when a strategy has an open position on a live account over the weekend, and the broker (in this case Dorman), goes down for service Friday night, when the server comes back, and I reconnect, I can't get the strategy top resume, so it starts managing the stops and targets again.

    Specifically, what settings for reconnect should I use when a strategy has an open order.

    Right now, I have it set on wait to flat, recalculate, don't sync account positions. I used to have it on keep running, wait to flat, don't sync account, but it didn't do what I wanted either.

    The feedback I'm getting now is - strategy tried to cancel the trailing stop order, it can't, then I'm told the strategy can't start , because it can't cancel the order. So, I'm left without the strategy running, and a pending cancel on the order.


    What settings do I use, so that if there is a disconnect when the strategy has an open position, that it picks up again, and keeps running once connection is re-established, so starts managing the trailing stops on an open position?

    I've tried various combinations of wait until flat, immediate submit live orders, recalculate, keep running, sync account position, and can't seem to get the settings for the behaviour I want...

    #2
    Originally posted by _Cujo View Post
    I'm having trouble getting the settings correct so when a strategy has an open position on a live account over the weekend, and the broker (in this case Dorman), goes down for service Friday night, when the server comes back, and I reconnect, I can't get the strategy top resume, so it starts managing the stops and targets again.

    Specifically, what settings for reconnect should I use when a strategy has an open order.

    Right now, I have it set on wait to flat, recalculate, don't sync account positions. I used to have it on keep running, wait to flat, don't sync account, but it didn't do what I wanted either.

    The feedback I'm getting now is - strategy tried to cancel the trailing stop order, it can't, then I'm told the strategy can't start , because it can't cancel the order. So, I'm left without the strategy running, and a pending cancel on the order.


    What settings do I use, so that if there is a disconnect when the strategy has an open position, that it picks up again, and keeps running once connection is re-established, so starts managing the trailing stops on an open position?

    I've tried various combinations of wait until flat, immediate submit live orders, recalculate, keep running, sync account position, and can't seem to get the settings for the behaviour I want...
    Try the settings that I show in this thread: http://ninjatrader.com/support/forum...ad.php?t=71198

    Comment


      #3
      Thanks. On that screen, I currently have: Wait until flat, recalculate, only cancel entry orders vs, your settings.

      A question on wait until flat vs immediately enter orders - if my strategy already has an open position on my live account, then there's a disconnect, and I restart the strategy after reconnect, will the strategy recognise a stop loss order as coming from it, or will it submit another order?

      Also, I note in the thread you question cancelling orders leaving exposed (also my problem(), yet you have cancel both entry and exits selected. Shouldn't I leave exit un-selected, so it doesn't try and cancel my stop loss?

      Comment


        #4
        Originally posted by _Cujo View Post
        Thanks. On that screen, I currently have: Wait until flat, recalculate, only cancel entry orders vs, your settings.

        A question on wait until flat vs immediately enter orders - if my strategy already has an open position on my live account, then there's a disconnect, and I restart the strategy after reconnect, will the strategy recognise a stop loss order as coming from it, or will it submit another order?

        Also, I note in the thread you question cancelling orders leaving exposed (also my problem(), yet you have cancel both entry and exits selected. Shouldn't I leave exit un-selected, so it doesn't try and cancel my stop loss?
        NT7 has no way of querying your orders on the server when NT7 starts. Therefore, if I want to restore historical orders and be sure that I do not end up having duplicate orders on the server, then I want the position reestablished completely historically. That means that I leave NT7 in the in a posture where it can read the position and establish the protected orders based on that position, so I would have to cancel any sitting orders.

        But maybe I am misspeaking. Is this position being established by a Strategy, or are you doing things manually? What I am saying really only applies if NT is in a situation where it is the one issuing the orders, per an automated strategy.

        Comment


          #5
          100% automated.

          The weekend server maintenance by Dorman (seems pretty much anyone does, it had same problem with IB) is screwing with any strategy that holds a position over the weekend (3 weekends in a row now, but not always that common).

          Ok, so if NT7 can't check orders on the server, then deleting both entry and exit and starting them over makes sense. I was approaching it from the point of view - if "something happens", then it's safer to cancel entry orders, but leave my exit/stop/profit target. BUT, "if something happens", is pretty much only broker server maintenance (I have NT running from a VPS).

          What about recalculate vs keep running? When I have tried recalculate, if it can't cancel the order (which it can't over the weekend, since even if it's connected there's no matching, or nothing on the other end) the strategy won't start. So, seems keep running has to be the selection. Think that makes sense.

          I'm struggling a little to get my head around sync account position to strategy...what do you have it set to, per strategy? I've read what it does, but it doesn't seem to make a difference when I change the settings on my live account.

          Comment


            #6
            Originally posted by _Cujo View Post
            100% automated.

            The weekend server maintenance by Dorman (seems pretty much anyone does, it had same problem with IB) is screwing with any strategy that holds a position over the weekend (3 weekends in a row now, but not always that common).

            Ok, so if NT7 can't check orders on the server, then deleting both entry and exit and starting them over makes sense. I was approaching it from the point of view - if "something happens", then it's safer to cancel entry orders, but leave my exit/stop/profit target. BUT, "if something happens", is pretty much only broker server maintenance (I have NT running from a VPS).

            What about recalculate vs keep running? When I have tried recalculate, if it can't cancel the order (which it can't over the weekend, since even if it's connected there's no matching, or nothing on the other end) the strategy won't start. So, seems keep running has to be the selection. Think that makes sense.

            I'm struggling a little to get my head around sync account position to strategy...what do you have it set to, per strategy? I've read what it does, but it doesn't seem to make a difference when I change the settings on my live account.
            IMHO, "sync account position to strategy" is conceivably the most dangerous setting on NT7. I am leery of anything or program issuing orders in my account on its own in an attempt to do anything, other than issue an order that I have explicitly coded. Just read the description, and you will be able to see how you can easily end up with an unprotected position because NT7 makes orders to attempt to synchronize the account.

            Some time back, I requested that NT be able to adopt the account position. This has been implemented in a fashion in NT8.

            If you are talking about NT8, I would suggest that you post in the correct section of the forum, and possible link back to this thread, or ask NT support to move the thread. This is in the NT7 section of the forum. I really answered because I thought that you were talking about NT7, and even though I read the code, a brain-miscue still did not tell me that that was actually NT8 code, so my NT7 stuff may not be relevant.
            Last edited by koganam; 02-19-2017, 05:52 PM.

            Comment


              #7
              I'm talking about NT7.

              Once a particular piece of add on software I use (Bloodhound and Blackbird from Shark Indicators) moves to NT8, then I will too. I can't move until it does, since it use it extensively. 100% automated entries, exits and trade management on a VPS. I use it so much, I even have multiple licenses for VPs and desktop.

              Ok, for sync account position got it, thanks. I think it was because I was hoping it would be sync NT to account, not vice versa, but think I got this, thanks.

              With the settings of immediately submit historical orders, keep running and cancel entry and exit, is it best to wait until markets open Sunday afternoon to enable strategies again? When I do it over weekend, for example now, it just makes bunches of orders that can't be routed, and are cancelled.

              Comment


                #8
                Originally posted by _Cujo View Post
                I'm talking about NT7.
                Of course you are. I was responding to someone else, and confused the two threads. Apologies.
                With the settings of immediately submit historical orders, keep running and cancel entry and exit, is it best to wait until markets open Sunday afternoon to enable strategies again? When I do it over weekend, for example now, it just makes bunches of orders that can't be routed, and are cancelled.
                You probably want to do things when the market is actually open and able to execute orders.

                Comment


                  #9
                  No worries. I've made my settings look like yours in the image now, except for the disconnection delay, restart attempts and restarts.

                  Otherwise, the same - submit historical orders, keep running and cancel both exits and entries.

                  Thanks! I'll restart the strategy that has the open position in a couple of hours after restart (it's a futures position, so Sunday restart), and see if it behaves as I'm trying to get it (start managing the position - stops and targets again). Although, I've already seen on a couple of strategies running on sim, that it seems to.

                  Thanks a bunch for talking it through with me. The settings I actually want for the behaviour I want seems a little counter intuitive to me, so I've been having trouble with it for months. But really drove me nuts as the last 3 weekends in a row, I've gone in to the weekend with an open position, so really needed to get it sorted out.

                  Comment


                    #10
                    Hello _Cujo,

                    I wanted to provide a link to a thread where I have mentioned steps for resuming a strategy.


                    As this strategy is not made by you, you may not be aware if the script has 1 tick intra-bar granularity which helps for a strategy to resume properly.
                    Last edited by NinjaTrader_ChelseaB; 02-19-2017, 06:47 PM.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by itrader46, Today, 09:04 AM
                    0 responses
                    3 views
                    0 likes
                    Last Post itrader46  
                    Started by timmbbo, Today, 08:59 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post timmbbo
                    by timmbbo
                     
                    Started by bmartz, 03-12-2024, 06:12 AM
                    5 responses
                    33 views
                    0 likes
                    Last Post NinjaTrader_Zachary  
                    Started by Aviram Y, Today, 05:29 AM
                    4 responses
                    14 views
                    0 likes
                    Last Post Aviram Y  
                    Started by algospoke, 04-17-2024, 06:40 PM
                    3 responses
                    28 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Working...
                    X