Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Orders on Server after Position Est?

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

    Strategy Orders on Server after Position Est?

    I think I'm ready to go live with a Strategy but before I do, I'm wondering where the orders sit after a fill happens and a position established.
    My Internet goes out from time to time and if my strategy is in a position and the internet goes out I need to know if I can just let it sit, or call my broker.

    I'm using the standard Set Commands (Profit Target and Stop Loss). It looks like these are submitted at the time of the fill to keep the orders together, but not sure.

    Do the SL and PT orders sit on the server if a position has been established? Or does one sit on the server and the other on the PC if the price is triggered? I think the SL sits on the server, but not sure about the PT order.
    Thanks!
    Joe

    #2
    Hi Joe,

    Please take a look at this article: http://www.ninjatrader-support2.com/...ead.php?t=5349
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh,
      So, now the question is, are orders submitted by a strategy when a position is established handled as OCO? Or some other linking method.
      Example:
      Buy at 1200 with a profittarget of 4 tics and a stoploss of 4 tics defined in the strategy..
      The order becomes filled and a long position established.
      Are the PT and SL orders that go with the filled order on a server, or on my PC?

      I use Zenfire. The link you sent isn't definitive enough to address automated strategy orders.
      Thanks,
      Joe

      Comment


        #4
        With Zen-Fire, orders are on the server of exchange but any OCO linkage is simulated by your local PC since Zen-Fire does not support OCO orders natively.
        RayNinjaTrader Customer Service

        Comment


          #5
          Ray,
          The link Josh posted already explained what you just said, and it still didn't answer my follow up question, which was: Are profit target and stop loss orders handled as OCO orders in a strategy? (when a strategy order is FILLED and a POSITION EXITS and there is a SL and PT order generated at the time of the fill)?

          If the answer is Yes, then I will need to call my broker and give them my profit target and stop loss orders by phone if my internet goes out, since the original exit orders are sitting on my PC which now can't talk to the servers or exchanges. True?

          If the answer is No, that they are handled differently and are not considered OCO, then I expect the orders are sitting at the exchange or on the server?

          Somewhere, in all the order handling stuff in the Help section, I thought I read all Stop Loss orders sit on the server unless Simulated =true. Maybe I didn't read that correctly either.

          Just to make sure I'm being clear;
          1. Are Stop Loss and Profit Target orders that are tied to an entry (fill) in a strategy on a server or exchange or not?
          Thanks,
          Joe

          Comment


            #6
            Joe,

            Brokers may very on this. My broker treats them as OCO. The way it was stated to me is "If you lose internet connection for any reason what so ever, and you have an open trade pick up the phone and call us!" It has happened to me twice (1: DSL went down 2: power outage) and when I called them there has never been an issue. They closed all open trades and canceled all open orders. To be on the safe side just pick up the phone.

            Way too many gremlins for me to do "Unattended Auto Trading" with a live account.

            Comment


              #7
              Thank You TAJTrades.

              I would never leave an autostrategy unattended, but I do like to have the knowledge of what's going on "behind the scenes" when these kind of scenarios happen. If I never get an answer to my question, calling my broker is the very first thing I will do. If I know the exit orders are sitting on the server, I can deal with an Internet outage in the best way.

              If I can ever find out if Ninja autostrategy treats the Profit Target and Stop Loss orders that accompany a fill as an OCO or not I'll have my answer. The Ninja platform has to submit the order, and I understand OCO's are handled differently with the various data providers. I just need to know how Ninja is submitting the PT and SL orders once a fill is established. I'm not sure how I can be more clear than that, but I still don't have an answer.

              I appreciate you taking the time to reply. I've been trading quite a long time but kind of new to the autostrategy stuff. I feel like I'm in 1st grade for autotrading!
              Joe

              Comment


                #8
                Joe,

                PT and SL orders are OCO from your NinjaScript Strategy provided you use the Set() methods. As mentioned, this is only simulated on your PC. If you lose internet there is no OCO behavior on your brokerage side.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thank you Josh!
                  That's exactly what I needed to know.
                  I really appreciate you and Ray doing this on a Saturday. Now, I'm all set for Monday.
                  Joe

                  Comment


                    #10
                    Just for additional clarification.

                    When you say "If you lose internet there is no OCO behavior", does this mean that providing you were connected at the time of entry order execution, the PT and SL orders would be submitted and held on the exchange or Zen-Fire, but if you subsequently lost your connection, you would still have an open order that needs to be cancelled after either the PT or SL was hit. Is that correct?

                    Also, if internet connection was lost after entry order submission, but prior to execution, the PT and SL orders would not be sent, or is the OSO (order sends order), held by Zen-Fire?

                    Thanks,
                    VT

                    Comment


                      #11
                      It means that if you are NOT connected, the OCO functionality for Zen-Fire is NOT working since this capability is driven by your PC.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        VT,
                        Looks like you think very closely to the way I do. In Ninja Help, the Risks of Electronic trading does a fair job of explaining how orders are handled. It's pretty generic and doesn't detail Manual Order submission, ATM submission or Ninja Script strategy submission, or give a step by step example of how an order is handled, but it's a good start.
                        Also, Apendix A, Order State definitions (in Help) is a good reference you can use to match your Transaction log against where your order is sitting. IF I read it correctly, Working orders are those that have been accepted by the Exchange and sit at the exchange, not on your PC. So, the way I'm interpreting that is any order that is NOT working is either on my PC, or waiting to be accepted by the exchange. (ZenFire)

                        Maybe the experts can correct this if I'm wrong, but the way I understand it now is:
                        1. Order to enter a position submitted by strategy.
                        Order Working (Transaction Tab) means exchange has the order and that's where it's sitting.
                        2. Order filled.
                        3. Strategy attaches SL and PT OCO orders to the open position. We can look at the Transaction Tab to what state those orders are in to confirm. If it's just Initialized, it's only on the PC. If they are Working then they are at the exchange (according to Apendix A.
                        4. Internet connection lost. If the SL and PT orders were only Initialazed (sitting on the PC), we now have an open position with no corresponding SL or PT order working. If the SL and PT orders are Working at the exchange, then if one gets hit, the other WON'T get cancelled since Josh and Ray say the FUNCTIONALITY of OCO is on the PC.

                        I think the big disconnect comes from talking about the FUNCTIONALITY of OCO versus the orders themselves and where the orders actually reside.

                        I think if we just look at the Transaction log we can see where the order itself actually is. Now that we know that OCO stops working with ZenFire if we lose internet connection, we'll know what to do.

                        If this is WRONG, somebody please let us know since we can't afford any mistakes trading live.
                        Thanks,
                        Joe

                        Comment


                          #13
                          Joe,
                          I took "OCO functionality" to mean that, as long as you were still connected when the ENTRY order was executed, the strategy would send 2 orders to the exchange, 1 limit (PT) and 1 stop (SL). However, the "link" that cancelled the remaining order would not be held by ZF, so the remaining order would have to be cancelled manually if you lost your connection after entry. If not you stand the risk of that order being executed also, essentially opening a new position in the opposite direction.

                          VT
                          Last edited by VTtrader; 11-30-2008, 04:10 PM.

                          Comment


                            #14
                            VT's understanding is correct. PT and SL both reach the exchange for Zen-Fire. The PT is in a Working state and the SL will be in an Accepted state. Both of which are held at the exchange. Losing internet drops the OCO functionality and you would want to call your brokerage to cancel out the remaining order.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              I think everything is crystal clear now. Bottom line is, if I'm in an open position and lose connection I need to call my broker. I'm much more at ease now.
                              Joe

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by yertle, Yesterday, 08:38 AM
                              7 responses
                              28 views
                              0 likes
                              Last Post yertle
                              by yertle
                               
                              Started by bmartz, 03-12-2024, 06:12 AM
                              2 responses
                              21 views
                              0 likes
                              Last Post bmartz
                              by bmartz
                               
                              Started by funk10101, Today, 12:02 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post funk10101  
                              Started by gravdigaz6, Yesterday, 11:40 PM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by MarianApalaghiei, Yesterday, 10:49 PM
                              3 responses
                              11 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X