Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Oco

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

    Oco

    OCO. Today I had an internet disconnection problem and an operation did not close and I had a loss. They told me that with the OCO order the orders are kept on the server and if ninjatrader is shut down or disconnected the operation closes itself. I have done several demo tests and they have closed only when I have opened ninjatrader. Could you explain how these orders work and which one is the best in case the internet connection is lost or ninjatrader closes? Thanks a lot.

    #2
    Hello,

    Thanks for your post.

    When trading with a live account, where your orders reside would depend on the brokerage technology you are using:
    https://ninjatrader.com/support/foru...-ninjatrader-7

    Typically the Stop loss and Profit targets are stored on the exchange servers and you can shut down NinjaTrader and they will still exist on the servers. However, if you are running an ATM strategy that modifies these trades such as an Auto Trail function on the Stop loss, NinjaTrader would need to be connected in order for it to submit these updates to the orders, and would advise always leaving NinjaTrader open when running an ATM Strategy.

    The same occurs with OCO functionality- NinjaTrader would need to be open to process the order cancelling operation on the order which is paired, but is not filled.

    With Sim101 orders, since there is no real brokerage applied to simulated orders, NinjaTrader would need to be open to process such an order.

    Please let me know if I may be of further assistance.
    Marco G.NinjaTrader Customer Service

    Comment


      #3
      Honestly, it has not been very clear to me. Of the 2 orders, ATM or OCO, which of the 2 are kept on the server if I turn off the computer? Which of the 2 orders is more reliable?
      Thanks.

      Comment


        #4
        Hello,

        Thanks for your reply.

        OCO (One Cancels Other) and ATM Strategies are both NinjaTrader Platform features that are managed on your computer. OCO orders are manually placed orders that, when one fills, the other is cancelled by the platform. OCO functionality is an aspect of the ATM Strategy trade management function, which also includes such features and auto trailing your stop and breakeven after your designated parameters are met.

        In both instances, these are managed on your computer, and NinjaTrader must be open to process these. The orders themselves are sent to the exchange and are held open until filled, weather NinjaTrader is open or not.

        An example would be an ATM with a Stop and Profit Target sent to the exchange. If NinjaTrader is closed, these will remain active at the exchange. However, the OCO functionality as a part of the ATM strategy will not function if NinjaTrader is not running- so if NinjaTrader is not running, and the Profit Target is filled, NinjaTrader will not be able to cancel the Stop order tied to the Profit Target- because it is not open to process that command.

        Please let me know if I may be of any further assistance.
        Marco G.NinjaTrader Customer Service

        Comment


          #5
          I hope this is not off topic... OCO orders and simulated stops are one of the main benefits of trading on a VPS.

          Trading at home, with a home computer and home internet connection is just simply not reliable. Assuming there are additional ISPs servicing your home, you can subscribe to additional internet connections and use software to bond the connections for failover.

          Or for the cost of a 2nd ISP, you can get a VPS and not have to worry about internet connection problems.

          Our VPS have dedicated 1Gbps connections and are located in Chicago with 1ms connection to CME and market gateway servers of Chicago based brokers.
          Would highly recommend checking out https://www.ninjamobiletrader.com/

          NinjaTrader ecosystem: https://ninjatraderecosystem.com/sea...biletrader-vps

          1ms latency to CQG servers in Chicago:
          Click image for larger version

Name:	1 ms Ping CQG.PNG
Views:	549
Size:	6.4 KB
ID:	1144433

          Originally posted by punkiy2111 View Post
          OCO. Today I had an internet disconnection problem and an operation did not close and I had a loss. They told me that with the OCO order the orders are kept on the server and if ninjatrader is shut down or disconnected the operation closes itself. I have done several demo tests and they have closed only when I have opened ninjatrader. Could you explain how these orders work and which one is the best in case the internet connection is lost or ninjatrader closes? Thanks a lot.
          Vendor_NT_Mobile
          NinjaTrader Ecosystem Vendor - Ninja Mobile Trader VPS

          Comment


            #6
            Originally posted by NinjaTrader_Marco View Post
            Hello,

            Thanks for your reply.

            OCO (One Cancels Other) and ATM Strategies are both NinjaTrader Platform features that are managed on your computer. OCO orders are manually placed orders that, when one fills, the other is cancelled by the platform. OCO functionality is an aspect of the ATM Strategy trade management function, which also includes such features and auto trailing your stop and breakeven after your designated parameters are met.

            In both instances, these are managed on your computer, and NinjaTrader must be open to process these. The orders themselves are sent to the exchange and are held open until filled, weather NinjaTrader is open or not.

            An example would be an ATM with a Stop and Profit Target sent to the exchange. If NinjaTrader is closed, these will remain active at the exchange. However, the OCO functionality as a part of the ATM strategy will not function if NinjaTrader is not running- so if NinjaTrader is not running, and the Profit Target is filled, NinjaTrader will not be able to cancel the Stop order tied to the Profit Target- because it is not open to process that command.

            Please let me know if I may be of any further assistance.
            Hi,
            I have executed an operation with OCO in sim1 and I have closed ninjatrader and ONLY when opening ninjatrader they close the orders but not at the fixed price of stop loss and profit ... (maybe 50 points lower or higher) ... you tell me that by ATM they would not close in sim1 either? And when is it a real account? I always used ATM before but a friend told me that OCO orders are kept on the server, and ATM orders (without trailing) with stop and profit are also kept on the server? The only thing I definitely want to know is OCO and ATM in sim1 or in real account, which of the 2 are kept on the server? One or 2?

            Thanks.

            Comment


              #7
              Hello punkyiy2111,

              Thank you for the response.

              When you are using a Simulation account, all of those orders are being held locally on your PC within your platform.
              So, if you place any kind of orders, even a basic limit order and then close the platform, this order would not fill until the platform is opened again and connected to market data.

              Once you connect to market data, the Simulation Engine will be able to see if that order is supposed to fill or not and make those decisions.
              This is why when you are submitting ATM Strategies to your Simulation account and then turning off the platform, they possibly fill at such a different price when the platform is opened and connected.

              When you are using a Live Account - Market, Limit, Stop Market, and Stop Limit orders are submitted to the exchange and held externally on their servers. If you go to the Orders tab of your Control Center and look at the State Column, you are able to see what state your orders are in.
              When it comes to OCO orders placed to a Live Account, as long as your broker supports OCO orders natively they will be submitted and held at the exchange.
              • For example, if I manually placed an OCO pair with a Buy Stop Market order and a Sell Stop Market order, these orders will be submitted to the exchange with an OCO ID attached.
              • At this point, you could turn off the PC and your Order would reside at the exchange with their OCO functionality if your Broker supports them. If one of them is filled or canceled, the other one will be canceled as well.
              • You will want to check with your broker to verify that they accept OCO orders.
              When It comes to using ATM Strategies with a Live Account, the thing to remember is that if anything requires any kind of logic beyond "fill at this price" you will need to have the platform open to make these decisions.
              • For example, if I submitted a Buy Limit order with an ATM Strategy attached and then turned off the platform. The Buy Limit order would reside at the exchange, but there is no way to include the logic of the ATM
              • At this point, you could turn off the PC and your Order would reside at the exchange with their OCO functionality if your Broker supports them. If one of them is filled or canceled, the other one will be canceled as well.
              When It comes to using ATM Strategies with a Live Account, the thing to remember is that if anything requires any kind of logic beyond "fill at this price" you will need to have the platform open to make these decisions.
              • For example, if I submitted a Buy Limit order with an ATM Strategy attached and then turned off the platform. The Buy Limit order would reside at the exchange, but you are not able to send ATM Strategy logic with an order. So, if the Buy Limit order is filled while the platform is off, it will NOT place any Profit Targets or Stop Loss targets.
              • Although, if you use an ATM Strategy with just Profit Targets and Stop Loss Targets and no further logic like a trailing stop or anything else that would cause things to move, you would be able to use the ATM Strategy to enter a position and the resulting Profit target and Stop loss target would be submitted to the exchange. At that point, you could turn off your PC as the Profit Target and Stop Loss target would have been submitted with an OCO ID attached and reside at the exchange
              • If your ATM Strategy uses any kind of special logic like a trailing stop, you will need to leave your platform open for these to continue to run.
              Clayton G.NinjaTrader Customer Service

              Comment


                #8
                Thank you very much!

                Comment


                  #9
                  • Although, if you use an ATM Strategy with just Profit Targets and Stop Loss Targets and no further logic like a trailing stop or anything else that would cause things to move, you would be able to use the ATM Strategy to enter a position and the resulting Profit target and Stop loss target would be submitted to the exchange. At that point, you could turn off your PC as the Profit Target and Stop Loss target would have been submitted with an OCO ID attached and reside at the exchange
                  • If your ATM Strategy uses any kind of special logic like a trailing stop, you will need to leave your platform open for these to continue to run.
                  If I'm only using ATM strategy AFTER an execution to generate OCO bracket and I disconnect, will the OCO pair YM @ CBT/CME/GLOBEX remain on the Exchange servers and and OCO one to the other? I also have stop trailings within the ATM strategy and quite understand those instructions would be lost on a disconnection. I plan on using IB as my broker.
                  Last edited by trymph; 03-11-2022, 10:06 AM.

                  Comment


                    #10
                    Hello trymph,

                    Thank you for the follow-up question.

                    As long as those orders make it to an "Accepted" or "Working" state by the broker/exchange they have been submitted off of your local computer and will be held on their servers.
                    • Please see the following link for more information on what the different order states mean:
                    • Please see the following link for more information on where your orders reside based on provider:

                    So, if you were to for example place a Buy/Sell Market order without an ATM Strategy attached, and then went over to the Control Center > Positions tab > Right-click on the position > Apply ATM Strategy > Choose your desired ATM Strategy.
                    • This will place the Targets as specified by the ATM Strategy
                    • These Targets will automatically have OCO Functionality and will be submitted along with the orders
                    • Our documentation shows that Interactive Brokers supports Native OCO on their servers. You would need to reach out to them directly to verify
                      .
                      • Once the Orders make it to a State of "Accepted" or "Working" those orders would be at your Broker/Exchange's servers and you could turn the computer off and they would still be working and have their OCO functionality

                    As you mention, if there was a Stop Strategy applied to the Stop Targets, these would not function if you turn off NinjaTrader.
                    • A Trailing Stop Strategy requires the NinjaTrader platform to see incoming market prices and make adjustments to the orders on the account on your behalf.
                    • If NinjaTrader was closed, there would be no way for the platform to be connected to market data to see the incoming prices. It also wouldn't be connected to your account to be able to submit and modify orders on your behalf.
                    Clayton G.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by samish18, Yesterday, 08:31 AM
                    2 responses
                    8 views
                    0 likes
                    Last Post elirion
                    by elirion
                     
                    Started by Mestor, 03-10-2023, 01:50 AM
                    16 responses
                    389 views
                    0 likes
                    Last Post z.franck  
                    Started by rtwave, 04-12-2024, 09:30 AM
                    4 responses
                    31 views
                    0 likes
                    Last Post rtwave
                    by rtwave
                     
                    Started by yertle, Yesterday, 08:38 AM
                    7 responses
                    29 views
                    0 likes
                    Last Post yertle
                    by yertle
                     
                    Started by bmartz, 03-12-2024, 06:12 AM
                    2 responses
                    23 views
                    0 likes
                    Last Post bmartz
                    by bmartz
                     
                    Working...
                    X