Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

strategy stops.

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

    strategy stops.

    my code checks the price before sendng a market or a stop order. however there can be race situations and what i find is that i get error from NT
    Native error='Sell stop or sell stop limit orders can't be placed above the market

    and the strategy shuts down closing my positions. how do i avoid it.
    Attached Files

    #2
    There is little that can be done except to move your stops farther away. This is the nature of electronic trading. It takes time for your order to traverse across the internet and by the time your brokerage receives and processes it, the market price could have moved in a direction that could cause your order to be rejected.

    All you can try to do to help reduce these scenarios is to minimize the internet latency between you and your brokerage/exchange.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      its a buy stop to enter. why should the strategy stop when the buy stop cannot be accepted. this is riticulous.
      in a automated strategy, i dont want it to halt unless i want it to halt.
      additionally, why does the strategy fill when the stop price inspire of the error and NT automatically close the trade. its a wasted trade .

      Additional clarification:
      If i goto tws and enter a stop price below the market price, it will accept. why is NT creating all of this rules which the broker does not enforce.
      Last edited by junkone; 06-02-2009, 09:06 AM.

      Comment


        #4
        It halts because NinjaTrader does not know what your strategy wants to do next. For the most part, people do not program contingent plans when an order is rejected and as such to prevent drastic problems downstream, the strategy is defaulted to halt immediately. If you feel you have programmed your strategy in a way that would handle everything the way you want you can turn off error handling, but you will be doing so at your own risk.



        NT closes the position because it is the safest thing to do. Leaving an unprotected position at the exchange is the last thing NT wants to do. The stance we take is to minimize damages. If you want otherwise, please turn off error handling and program your own ways to deal with problems your strategy may encounter.

        NT is not making any rule. A stop order below the market will be accepted, even from within NT.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          where would the real errors or exceptions be stored. the link you haev proivded only shows how to handle when a order status changes. it does not show where the errors or exceptions are stored for me to analyse and handle appropriately.

          Comment


            #6
            That is exactly how you do it. Order rejected, therefore do something.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              i would not know all the reasons why the order is rejected. my order handling would depend on the reasons why the order got rejcted. to do that i need to know why NT got a order rejected error or exception. where do i get it.

              Comment


                #8
                Not available. You can try parsing it from the logs.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  common josh. pl dont make me run chasing wild gooses. somewhere somehow, NT can access the error. whether it is undocumented or not, i will use it at my own risk. but i need some one to give me a hint as to where to look.

                  Comment


                    #10
                    junkone,

                    Unfortunately it is not available.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    656 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    371 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    579 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X