Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Does stop order has been ignored error message get generated when trading live?

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

    Does stop order has been ignored error message get generated when trading live?

    In backtesting a new strategy, I had the following error message in the log file “A SellShort stop order placed at '2/12/2010 1:00:00 AM' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.”

    If this strategy was running live instead of being backtested, does NT block this order from going over the brokerage (MBT in my case) and give this error message or would the order go to the brokerage and come back with an order status of rejected?

    #2
    Hello TraderVick,

    NinjaTrader will detect that this is an invalid order and it will not be sent to the broker.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply. Another question. I am testing this new strategy in NT7, where I can set up a mail alert. Is this error log message an alert type?

      Comment


        #4
        Creating mail alerts can be done in the strategy wizard. As one of your potential actions, you choose Misc > Send mail.



        The message you received isn't part of an alert. You would have to work with Iorder objects and check that the state of your order has been rejected. This is assuming you want to create an email alert based on its status. If this isn't your intention let us know.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          From what I can tell, NT detected that the order was invalid and the OnOrderUpdate logic wasn't executed. OnOrderUpdate is where I check for the order state being rejected. Should I check for this state in the OnExecution section?

          Comment


            #6
            That's true, and no, OnExecution() will not receive the event either. You will have to check that the price is valid prior to submitting your order.


            For Longs:
            Code:
             
            if (stopOrderPrice >= GetCurrentBid())
            {
            //Submit order
            }
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              Got it. Thanks for help!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by charlesugo_1, 05-26-2026, 05:03 PM
              0 responses
              56 views
              0 likes
              Last Post charlesugo_1  
              Started by DannyP96, 05-18-2026, 02:38 PM
              1 response
              143 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 05-11-2026, 05:56 AM
              0 responses
              160 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 05-10-2026, 08:12 PM
              0 responses
              96 views
              0 likes
              Last Post CarlTrading  
              Started by Hwop38, 05-04-2026, 07:02 PM
              0 responses
              276 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Working...
              X