Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

exit fill price - exit optimization

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

    exit fill price - exit optimization

    Hello,

    I have a question please referring the fill price. Is it the same fill price with the both possibilties a.) and b.) here?

    a.) ExitLong(xxx)

    or when I move the stop with same conditions with
    b.) ExitLongStop(0, true, Position.Quantity, GetCurrentBid(), "Stop1", "M1");

    c.) ? is there a better way to do the exit in a script?

    Can be some situations where one of the both is better or one of the both is filled every time (while the other maybe not)?

    Its important to know as I will work with the safer way, if there is a difference between a.) and b.)

    Thanks
    Tony
    Last edited by tonynt; 03-06-2013, 07:38 AM. Reason: clearify

    #2
    Hello Tony,

    Thank you for your post.

    The ExitLong() will exit the position at the next available market price.

    ExitLongStop(0, true, Position.Quantity, GetCurrentBid(), "Stop1", "M1"); will place a Stop Market order at the last traded Bid price, however the market could move away from this order.

    There is no "better" way to exit your position as this is circumstantial to your strategy and your trading style.

    For information on the Managed Approach for orders please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Thank you for your reply.

      Of course the price can move away from this order with the exitlongstop.

      With my question I mean if at this moment of time there is the same result, as the exitlong will be executed at the bid, no? And as the GetCurrentBid() in my stop is the same this is the same result, no?

      If price goes down, against me in this long, its also the same result?

      Is there a difference in the "quality" of order handling I mean, so that one is filled and other not - maybe in specific market situations (fast moving prices...)

      Thanks
      Tony

      Originally posted by NinjaTrader_PatrickH View Post
      Hello Tony,

      Thank you for your post.

      The ExitLong() will exit the position at the next available market price.

      ExitLongStop(0, true, Position.Quantity, GetCurrentBid(), "Stop1", "M1"); will place a Stop Market order at the last traded Bid price, however the market could move away from this order.

      There is no "better" way to exit your position as this is circumstantial to your strategy and your trading style.

      For information on the Managed Approach for orders please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

      Please let me know if I may be of further assistance.

      Comment


        #4
        Originally posted by tonynt View Post
        Thank you for your reply.

        Of course the price can move away from this order with the exitlongstop.

        With my question I mean if at this moment of time there is the same result, as the exitlong will be executed at the bid, no? And as the GetCurrentBid() in my stop is the same this is the same result, no?

        If price goes down, against me in this long, its also the same result?

        Is there a difference in the "quality" of order handling I mean, so that one is filled and other not - maybe in specific market situations (fast moving prices...)

        Thanks
        Tony
        Enter with Limit Orders: if you must exit immediately, use a Market Order. The problem with using a dynamic Stop Order at the Bid to exit a Long position is that even in the admittedly very short transmission time, in a sufficiently fast market (e.g., news), that time can be sufficient such that the price has moved against you by the time your order reaches the exchange, in which case the order will be rejected as a Stop placed ahead of the market.

        Comment


          #5
          Thank you for your reply. This is what I meant.

          BUT: when doing ExitLongStop(0, true, Position.Quantity, GetCurrentBid(), "Stop1", "M1");

          isnt this also like a market order, as always true, as there is always a bid?

          Thanks
          Tony


          Originally posted by koganam View Post
          Enter with Limit Orders: if you must exit immediately, use a Market Order. The problem with using a dynamic Stop Order at the Bid to exit a Long position is that even in the admittedly very short transmission time, in a sufficiently fast market (e.g., news), that time can be sufficient such that the price has moved against you by the time your order reaches the exchange, in which case the order will be rejected as a Stop placed ahead of the market.

          Comment


            #6
            Hello Tony,

            Thank you for your response.

            That would not be the same as a Market Order. The Stop Market Order only becomes a Market Order once it's price level has been reached.

            For information on Market Orders please visit the following link: http://www.sec.gov/answers/mktord.htm

            For information on Stop Market Orders please visit the following link: http://www.sec.gov/answers/stopord.htm

            Please let me know if I may be of further assistance.

            Comment


              #7
              Originally posted by tonynt View Post
              Thank you for your reply. This is what I meant.

              BUT: when doing ExitLongStop(0, true, Position.Quantity, GetCurrentBid(), "Stop1", "M1");

              isnt this also like a market order, as always true, as there is always a bid?

              Thanks
              Tony
              That is the point. GetCurrentBid() is the bid at the time that your PC processes the instruction. In a fast market it is possible that your order will be ahead of the market by the time that it reaches the exchange because the price at the exchange has moved against you while your order was being transmitted.

              Real life scenario: it has happened to me; it is not a theoretical scenario. A Market Order is a market order, and is guaranteed to get you out, even if with slippage. I would rather be out of a position wishing that I were in, than in a position wishing that I were out, especially if it is because I sent an exit order that was skipped for any reason!
              Last edited by koganam; 03-06-2013, 01:34 PM.

              Comment


                #8
                Thank you.

                Other question in the concern trade-management please:

                eg we have an EnterLong(6) with an ExitLongStop(6) and we do then an ExitLong(2) - is the ExitLongStop cancelled then? I experienced some times when the ExitLongStop was cancelled with an ExitLong and I had experienced other times when ExitLongStop persisted so I had to cancel it and set up a new on for the remaing quantity(4). When is the stop cancelled by doing an exit and when not?

                Thanks
                Tony



                Originally posted by NinjaTrader_PatrickH View Post
                Hello Tony,

                Thank you for your response.

                That would not be the same as a Market Order. The Stop Market Order only becomes a Market Order once it's price level has been reached.

                For information on Market Orders please visit the following link: http://www.sec.gov/answers/mktord.htm

                For information on Stop Market Orders please visit the following link: http://www.sec.gov/answers/stopord.htm

                Please let me know if I may be of further assistance.

                Comment


                  #9
                  koganam,

                  thank you for your explanation!

                  I think now first time I really got where there might be a difference!

                  But from this I understand that the "normal" stop with ExitLongStop(0, true, Position.Quantity, Position.AvgPrice, "Stop1", "M1"); will work correctly (like the market order) without the problem that might occur in fast moving markets WHEN it is set already at the "right" time before the price in the ExitLongStop is triggered(?)

                  Thanks
                  Tony

                  Originally posted by koganam View Post
                  That is the point. GetCurrentBid() is the bid at the time that your PC processes the instruction. In a fast market it is possible that your order will be ahead of the market by the time that it reaches the exchange because the price at the exchange has moved against you while your order was being transmitted.

                  Real life scenario: it has happened to me; it is not a theoretical scenario. A Market Order is a market order, and is guaranteed to get you out, even if with slippage. I would rather be out of a position wishing that I were in, the in a position wishing that I were out, especially if it is because I sent an exit order that was skipped for any reason!

                  Comment


                    #10
                    Hello Tony,

                    Thank you for your response.
                    Originally posted by tonynt View Post
                    Thank you.

                    Other question in the concern trade-management please:

                    eg we have an EnterLong(6) with an ExitLongStop(6) and we do then an ExitLong(2) - is the ExitLongStop cancelled then? I experienced some times when the ExitLongStop was cancelled with an ExitLong and I had experienced other times when ExitLongStop persisted so I had to cancel it and set up a new on for the remaing quantity(4). When is the stop cancelled by doing an exit and when not?

                    Thanks
                    Tony
                    The ExitLongStop() will not be cancelled, you must ensure you enter and exit the proper quantity with the Exit orders or you could end up with an unwanted position.

                    For information on using the Managed Approach for orders please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

                    Please let me know if I may be of further assistance.

                    Comment


                      #11
                      Originally posted by tonynt View Post
                      koganam,

                      thank you for your explanation!

                      I think now first time I really got where there might be a difference!

                      But from this I understand that the "normal" stop with ExitLongStop(0, true, Position.Quantity, Position.AvgPrice, "Stop1", "M1"); will work correctly (like the market order) without the problem that might occur in fast moving markets WHEN it is set already at the "right" time before the price in the ExitLongStop is triggered(?)

                      Thanks
                      Tony
                      Normally yes. If you have a sitting StopMarket order, it will usually be filled even if the market gaps past it. Of course, that means slippage.

                      StopLimit orders are a different kettle of fish; the market can gap past them and leave the resultant Limit Order sitting there like a pendejo.

                      Comment


                        #12
                        Thanks again for your reply.

                        This problem I was not aware of untill now. Instead of the ExitLongStop that works like a limit order, which one would you use then for a stop with market order?

                        Best
                        Tony


                        Originally posted by koganam View Post
                        Normally yes. If you have a sitting StopMarket order, it will usually be filled even if the market gaps past it. Of course, that means slippage.

                        StopLimit orders are a different kettle of fish; the market can gap past them and leave the resultant Limit Order sitting there like a pendejo.

                        Comment


                          #13
                          Originally posted by tonynt View Post
                          Thanks again for your reply.

                          This problem I was not aware of untill now. Instead of the ExitLongStop that works like a limit order, which one would you use then for a stop with market order?

                          Best
                          Tony
                          ExitLongStop() is a StopMarket order. It is what I use in code for static stops that are placed away from the market. For immediate exits, triggered when a condition is hit, I use ExitLong(), which is a pure Market Order. As I said, if I want out immediately, I just want out: damn the slippage.

                          In discretionary trading I use StopLimit orders if I am watching the market, because I can always intervene and just get out if the order is violated without getting filled. If I am not going to be watching the market, I use StopMarket orders in discretionary trading too.

                          Comment


                            #14
                            "intelligent" trademanagement(?)

                            What do you think about this idea:

                            For the trade-management I´m thinkin instead of exit immediately to keep the chance to stay in the trade if the price continues moving in the profit-direction.

                            But because of the discussed problem with rejected ExitLongStop in some case, what about the idea to bring up the referring tight ExitLongStop eg 1pip below the bid and to bring up a 2nd ExitLongStop with more distance for the case that the tighter one is not triggered because rejected eg in case of very fast market.

                            Thjs can be coded by the way so that if one of the both stops is filled then the other one is cancelled. (with OnOrderUpdate or OnExecution). Or do you think there might be the risk of a fill (overfill) in the other direction or another problem?

                            If this works from NT-order handling one can stay in the trade if it goes in the winning direction, but if price goes other direction one is out only 1 pip below the "origin target" and for the case this tight stop is ignored there is the 2nd stop as "insurance" and if position closed - whereever - both stops triggered or cancelled.

                            Whats your opinion?

                            Best
                            Tony



                            Originally posted by koganam View Post
                            ExitLongStop() is a StopMarket order. It is what I use in code for static stops that are placed away from the market. For immediate exits, triggered when a condition is hit, I use ExitLong(), which is a pure Market Order. As I said, if I want out immediately, I just want out: damn the slippage.

                            In discretionary trading I use StopLimit orders if I am watching the market, because I can always intervene and just get out if the order is violated without getting filled. If I am not going to be watching the market, I use StopMarket orders in discretionary trading too.
                            Last edited by tonynt; 03-06-2013, 03:30 PM. Reason: clearify

                            Comment


                              #15
                              Originally posted by tonynt View Post
                              What do you think about this idea:

                              For the trade-management I´m thinkin instead of exit immediately to keep the chance to stay in the trade if the price continues moving in the profit-direction.

                              But because of the discussed problem with rejected ExitLongStop in some case, what about the idea to bring up the referring tight ExitLongStop eg 1pip below the bid and to bring up a 2nd ExitLongStop with more distance for the case that the tighter one is not triggered because rejected eg in case of very fast market.

                              Thjs can be coded by the way so that if one of the both stops is filled then the other one is cancelled. (with OnOrderUpdate or OnExecution). Or do you think there might be the risk of a fill (overfill) in the other direction or another problem?

                              If this works from NT-order handling one can stay in the trade if it goes in the winning direction, but if price goes other direction one is out only 1 pip below the "origin target" and for the case this tight stop is ignored there is the 2nd stop as "insurance" and if position closed - whereever - both stops triggered or cancelled.

                              Whats your opinion?

                              Best
                              Tony
                              Kind of the principle of a Disaster Stop. I am not sure if you can actually manage to get this working with Managed Orders. You can but try, and let us know if it actually works. The log will tell you if the second order is rejected.

                              Just remember to cancel all orders if you go flat because you get taken out. You do not want to reverse because of your order that is still sitting there, unless of course, you actually do want to reverse.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by WHICKED, Today, 12:45 PM
                              2 responses
                              16 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by GussJ, 03-04-2020, 03:11 PM
                              15 responses
                              3,272 views
                              0 likes
                              Last Post xiinteractive  
                              Started by Tim-c, Today, 02:10 PM
                              1 response
                              8 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by Taddypole, Today, 02:47 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Taddypole  
                              Started by chbruno, 04-24-2024, 04:10 PM
                              4 responses
                              51 views
                              0 likes
                              Last Post chbruno
                              by chbruno
                               
                              Working...
                              X