• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

flattening position on connection loss

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

    flattening position on connection loss

    Hi there, I am running a ninjascript strategy and I have an issue on connection loss handling. I want my strategy to not only be cancelled, but also my position to be automatically flattened on connection loss. It is very concerning to have open positions when you are disconnected from the data feed.

    Is there a way to set Ninjatrader to flatten all positions on connection loss?

    Thanks,

    Erfan.

    #2
    Hello Efran,

    Thanks for your post.

    This would not be possible. If you are disconnected it wont be able to send the signal. You would need to contact your broker's order desk to manage your orders/position.
    BrandonNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Brandon View Post
      Hello Efran,

      Thanks for your post.

      This would not be possible. If you are disconnected it wont be able to send the signal. You would need to contact your broker's order desk to manage your orders/position.
      Is there any way with Ninjatrader Brokerage to set it up so that they automatically flatten my position on connection loss? Or is there anyway to set up an email/sms to alert me of the disconnection so that I can call the broker?

      Comment


        #4
        Hello Erfan,

        Thanks for your reply.

        No, this could not be done on the brokerage end.
        Yes, if you still have internet you could email an alert for connection loss.
        You can check for the connection using OnConnectionStatus()
        http://www.ninjatrader.com/support/h...tionstatus.htm
        BrandonNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Brandon View Post
          Hello Efran,

          Thanks for your post.

          This would not be possible. If you are disconnected it wont be able to send the signal. You would need to contact your broker's order desk to manage your orders/position.
          I am now confused about the order handling options:

          Cancel entry orders when a strategy is disabled
          Cancel exit orders when a strategy is disabled


          How is that possible if the strategy is disabled due to a disconnection? Surely you would need to be connected to cancel any orders pending at the exchange???

          Comment


            #6
            Hello Erfan,

            Thanks for your reply.

            That is correct. In the second post in this topic I this is what I was saying.
            BrandonNinjaTrader Customer Service

            Comment


              #7
              Originally posted by nourozi View Post
              I am now confused about the order handling options:

              Cancel entry orders when a strategy is disabled
              Cancel exit orders when a strategy is disabled


              How is that possible if the strategy is disabled due to a disconnection? Surely you would need to be connected to cancel any orders pending at the exchange???
              To clarify, the order handling options you reference determine how the strategy handles orders when the strategy is disabled, which is not the same as losing connection. What is implied by those options is how the strategy handles orders when a user turns off a strategy, or the strategy is disabled after an error.

              The strategy may keep running when you lose connection, but ultimately depends on your On connection loss options. Even if you have your strategy set to stop on connection loss, the options you reference do not apply - there is no way for us to cancel or attempt to cancel an order if you've lost a connection to the order server.
              MatthewNinjaTrader Product Management

              Comment


                #8
                Why is my strategy disabled on disconnection????? What is the point of the Keep Running mode when it doesn't work. I want my strategy to keep running on reconnection as if nothing happened but it disables my strategy on disconnection......

                This is very confusing.

                Comment


                  #9
                  nourozi, so you see a connection loss and wait then for the auto reconnect to work out, correct? You're not manually forcing a disconnect here?

                  Please email us your diagnostic log and traces files to review for this scenario in question. This would be easiest done via Help > Mail to Support in the platform directly. Thanks.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    What do you mean by entry and exit order? Would an entry order be a limit order waiting to be filled? What if you are Long for example and have a stop loss and take profit in the market? If Cancel entry and exit is checked, then when there is an error, the position is closed and the take profit and stop loss is closed?

                    Comment


                      #11
                      Hello brucelevy,

                      Entry in this context refers to any order that causes you to leave a flat position, and exit here refers to any order that returns you to a flat position. When you are long, entry refers to orders on the long side of the market and exit orders on the short. When you are short, entry refers to orders on the short side of the market and exit orders on the long. When we check one of the cancel checkboxes, and we either manually disable a strategy or have a strategy disabled due to a runtime error, all pending limit and stop loss orders on the appropriate side of the market are indeed canceled.

                      I am including a link to the Help Guide page on Managed Order Entry for more information.

                      http://ninjatrader.com/support/helpG...er_methods.htm
                      Jessica P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by rwilliam, Today, 03:14 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post rwilliam  
                      Started by rwilliam, Today, 03:10 PM
                      1 response
                      3 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by rontronimous, Today, 03:04 PM
                      2 responses
                      4 views
                      0 likes
                      Last Post rontronimous  
                      Started by zacharydw00, Today, 03:14 PM
                      0 responses
                      2 views
                      0 likes
                      Last Post zacharydw00  
                      Started by junkone, 09-12-2019, 07:10 PM
                      11 responses
                      81 views
                      0 likes
                      Last Post cnecorp
                      by cnecorp
                       
                      Working...
                      X