Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop limit orders vs stop market orders

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

    stop limit orders vs stop market orders

    My understanding is that if I call the exit market API to set a S/L or TP, that this is a guaranteed stop loss in the sense that it will execute, not necessarily at the price I want. It will however close the position eventually.

    OTOH, exit stop limit will place an ask; if a seller wants to buy at the price, then the stop loss is reached and the exchange is over. However, if no seller exists for the instrument at that price, then the S/L or TP can remain open even as the entry price moves outside of the gap.

    Is this correct?

    If I want a guaranteed (eventual) TP to be hit, I need to use the exit market API calls right?

    I've seen situations in IRL trading where a TP gets blown past (nice problem) and ditto for S/L. I think the limit order was the issue.

    Thx in advance!

    #2
    Hello sultanofsuede,

    Yes, a stop market order becomes a market order when touched and fills at the market price as long as there are opposing orders to trade with.
    A stop limit order becomes a limit when touched, a limit order fills at the specified price or better.

    Yes, a limit would remain open unless cancelled if the market is behind the limit price.

    Below are publicly available links to an educational site Investopedia on these order types.







    "If I want a guaranteed (eventual) TP to be hit, I need to use the exit market API calls right?"

    The API (Application Programming Interface) is how an external application interfaces with the NinjaTrader Desktop Application.

    NinjaScripts do not run through the API but are compiled internally in NinjaTrader and run internally in NinjaTrader.

    Below is a link to a support article on using the API.



    If this is a NinjaScript Strategy, call ExitLong() or ExitShort() to immediately exit the market with a market order.
    If you want to exit after the price has exceeded a specific price then use a Limit order or Stop Limit Order.


    "I've seen situations in IRL trading where a TP gets blown past (nice problem)"

    A limit order would fill at market price if the market price is a better price.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      What would cause the TP to get blown past? My sibling made an extra 200 when the TP never tripped off. Candle just ran past it. He's also had losses where the S/L was never hit. In both cases, the handles from the chart trader are showing and are set for several seconds. This is not an instant whip past those. I would expect if the handle bars are on the chart, then the open orders are set.

      UPDATE: In the case of the TP 200 profit, he had to go flat manually. The TP just sat there on the chart. Ditto for the S/Ls.
      Last edited by sultanofsuede; 10-30-2024, 11:24 AM.

      Comment


        #4
        For my Schwab equities account, a stop limit order is *not* guaranteed to get a fill. You can ask for X price, but if there is no buyer, it will not trip. It's a riskier trade, but one you make when you want a certain price or nothing at all.

        A stop loss on an equity is guaranteed to fill, not necessarily at the price you set.

        In NT, I and my sibling have seen cases where the TP S/L were not honored. I can understand there being slippage if the position can only be exited at a different price; but not to exit at all after several minutes means we don't understand something here.

        Comment


          #5
          Hello sultanofsuede,

          "What would cause the TP to get blown past?"

          It depends on the order type used. If the order is a limit order and the order is working on the exchange severs, and the price passes through the order, the order will fill immediately at the market price.

          My guess would be a misunderstanding of the order type, ask or bid price, and order state.

          If the order was a limit order and the ask or bid market price (depending on the direction of the order) is past the limit price and the order did not fill, this shouldn't be possible and you should contact your broker to confirm the order was in a working state on the exchange servers before the price passed through the limit price.

          In the script, you can print the ask or bid from OnMarketData(), and print the order.ToString() in OnOrderUpdate() to confirm the price went past the limit price of the working order and the order did not fill.

          Below is a link to a support article on adding debugging prints to understand behavior.


          "For my Schwab equities account, a stop limit order is *not* guaranteed to get a fill. "

          Correct. A limit order fills at the specified price or better. If the market has not reached the specified price the order will not fill.
          A stop order has to be touched at the stop price and then the order will become a limit order. This means after a stop limit is touched the market price must be equal to or ahead of the limit price.

          "You can ask for X price, but if there is no buyer, it will not trip."

          For all orders, an opposing order would needed to make a trade. If you are buying someone has to be selling. If you are selling someone has to be buying.


          "In NT, I and my sibling have seen cases where the TP S/L were not honored. I can understand there being slippage if the position can only be exited at a different price; but not to exit at all after several minutes means we don't understand something here."

          I would think the issue comes to a misunderstanding of the order type, ask or bid price, and order state.

          Printing the information to the output window would allow you to investigate.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            My guess would be a misunderstanding of the order type, ask or bid price, and order state.

            So when he's trading on NT and the TP gets bypassed and he goes flat manually because the order is ignored, who does he call? I thought NT was the broker?

            FWIW, this happened at the open last Friday. I'm not sure how these price entries are able to range over the chart while the S/L and TPs are set.

            Comment


              #7
              Hello sultanofsuede,

              "I thought NT was the broker?"

              NinjaTrader Desktop is able to connect to NinjaTrader Brokerage, Interactive Brokers, Forex.com, Rithmic based brokerages, Continuum based brokerages, eSignal, and many other brokerages.


              NinjaTrader would be the broker if you have funded an account with NinjaTrader Brokerage and you have connected to that brokerage account in the Connections menu.

              If you have connected to a different brokerage, that brokerage would be the brokerage you connected to.

              "So when he's trading on NT and the TP gets bypassed and he goes flat manually because the order is ignored, who does he call?"

              They should call their broker who they have funded an account with. If their broker is NinjaTrader Brokerage, they should call NinjaTrader Brokerage. If their brokerage is a different brokerage, they should call that brokerage.

              "FWIW, this happened at the open last Friday. I'm not sure how these price entries are able to range over the chart while the S/L and TPs are set."

              CRITICAL — If your inquiry involves live orders, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                No, we are both NT people for futures. We use different brokers altogether for other stuff.

                Thank you Chelsea for the helpful info and for answering so many questions!

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                553 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                100 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                543 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                546 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X