Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop loss

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

    stop loss

    I've noticed in the log "An order has been ignored since the stop price ‘4068.25’ near the bar stamped ‘13/12/2022 13:29:11’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored"

    This was a short trade and the tick price may have been above the stop loss before it was set.

    How does NT8 handle this?

    #2
    Hello dibDab,

    This would be in historical.

    In real-time the order would have been rejected by the broker.

    We recommend that you ensure the stop price is a valid price, above the GetCurrentAsk() if a buy, below the GetCurrentBid() if a sell.
    Is this the correct way to resubmit rejected EnterLongStopMarket() orders: private Order rejectedEntryOrder = null; if (rejectedEntryOrder != null) rejectedEntryOrder = GetRealtimeOrder(rejectedEntryOrder); if ((entryOrder == null || entryOrder2 == null) && Close[0] > Close[1]) { EnterLongStopMarket(0, true, 1,


    If the stop price is equal to or ahead of the market price, use a market order to exit the position immediately.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      not sure I understand?

      if I buy at GetCurrentAsk shouldn't the stop be below the GetCurrentAsk
      if I sell at GetCurrentBid shouldn't the stop be above the GetCurrentBid

      Comment


        #4
        Hello dibDab,

        A buy stop order must have the stop price above the ask.

        A sell stop order must have the stop price below the bid.

        Give a it a try manually.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          :Click image for larger version  Name:	buySell.png Views:	0 Size:	3.9 KB ID:	1227942

          ok thanks, do I have this right? A couple of questions ...

          what should I use historically to get current bid or ask? (real-time GetCurrentBid/GetCurrentAsk)?

          my entries/exits are on a 1tick bar series so should I approximate with something like BarsArray[1].LastPrice?
          Last edited by dibDab; 12-17-2022, 04:32 AM.

          Comment


            #6
            Hello dibDab,

            This understanding is correct.

            In historical you can enable TickReplay and use GetCurrentBid()/GetCurrentAsk().
            Since historical uses Last data only, you can compare the price to being less that the last price.

            A secondary series last price is Closes[1][0].
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Today, 05:17 AM
            0 responses
            50 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            69 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X