Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop Order Problems

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

    Stop Order Problems

    I'm submitting a Stop Entry when some conditions are met, then when the entry order get filled i put a Stop order, but if the Low of the new bar is lower than my stop Exit order it wont exit and stay in a trade until the session finish, is there a way to fix it, or prevent it?.
    Attached Files

    #2
    Hi PrTester, did you let then run with TraceOrders = true in the Initialize? Maybe it's not picking it up correctly because the signal names do not match.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi PrTester, did you let then run with TraceOrders = true in the Initialize? Maybe it's not picking it up correctly because the signal names do not match.
      This only happened when the low < than my ExitStop Order, just in rare occasions, but when happen the buy/sell still live until the end of session. And the trailing or exit logic don't work. if the low < than my order i like to exit the order.

      To answer the question the signal name its not the problem and work as expected all the time except when that condition occurs. Any idea how to fix it?

      Comment


        #4
        PrTester,

        Please turn on TraceOrders = true. You should find your stop order to be rejected. You will need to program some logic to handle this. Perhaps resubmit at a lower price if rejected, or just have a lower stop to begin with.

        In real-time things will be different since the low price should not influence the placement of your order unless the new bar gaps down significantly.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          PrTester,

          Please turn on TraceOrders = true. You should find your stop order to be rejected. You will need to program some logic to handle this. Perhaps resubmit at a lower price if rejected, or just have a lower stop to begin with.

          In real-time things will be different since the low price should not influence the placement of your order unless the new bar gaps down significantly.

          Josh

          I try the following snippet among others but no luck,

          if( Position.MarketPosition == MarketPosition.Long
          && entryOrder != null
          && stopOrder.OrderState == OrderState.Rejected )
          {
          ExitLong();
          }


          any recommendations?,

          Regards

          Comment


            #6
            PrTester,

            First you need to determine if this is actually the case. I was throwing out possibilities earlier. You should be program to the OnOrderUpdate() method. When you receive the OrderRejected state for that particular order then you can submit your close position order.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              PrTester,

              First you need to determine if this is actually the case. I was throwing out possibilities earlier. You should be program to the OnOrderUpdate() method. When you receive the OrderRejected state for that particular order then you can submit your close position order.
              Josh,

              Just an update, I just exit the order if the condition exist and Current Bar is > My OrderBar + N bars. Can not make it work on the OnOrderUpdate() method, but it work.

              Thanks, for your help as always .

              Comment


                #8
                Glad you got it working. Have a good day.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by hazylizard, Today, 08:38 AM
                3 responses
                10 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by geddyisodin, Today, 05:20 AM
                2 responses
                18 views
                0 likes
                Last Post geddyisodin  
                Started by Max238, Today, 01:28 AM
                5 responses
                47 views
                0 likes
                Last Post Max238
                by Max238
                 
                Started by giulyko00, Yesterday, 12:03 PM
                3 responses
                13 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by habeebft, Today, 07:27 AM
                1 response
                16 views
                0 likes
                Last Post NinjaTrader_ChristopherS  
                Working...
                X