Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Identify this IOrder State?

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

    How to Identify this IOrder State?

    Hello--

    Given a bug in my strategy, the Output window kicked me the following message:

    **NT** A Buy order placed at '3/23/2014 11:30:00 PM' has been ignored since the stop price is less than or equal to the close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
    I would like to create a condition in my strategy that tells me when this IOrder state was achieved, but I'm not sure what IOrder state this is. Would it be OrderState.Rejected? My plan will then be to create a condition that when true, I'l print something on my chart that focuses me in on what's going on (so that I can troubleshoot it).

    I'm not worried about the reason the message was kicked (in this case), but I might have missed it because it did not short circuit my strategy--in this case, the order was simply rejected. I have a plan to fix the underlying reason...

    I'm just looking to help myself identify these issues in the future....

    Thanks,

    Aventeren

    #2
    Hello Aventeren,

    Thank you for your post.

    This message is only regarding historical orders and the orders are never submitted. In real-time the orders are rejected and the strategy is disabled.

    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickH View Post
      Hello Aventeren,

      Thank you for your post.

      This message is only regarding historical orders and the orders are never submitted. In real-time the orders are rejected and the strategy is disabled.

      Please let me know if I may be of further assistance.
      I thought that it would have disabled the Strategy, too, but the strategy just kept right on going. I only noticed it because the entry wasn't made where it should have been made, but the next signal and entry proceeded just fine.

      Any ideas on why the strategy didn't disable itself?

      Is there some sort of an IOrder state that I can check either via OnOrderUpdate() or OnExecution() that would point me to these situations so that I can put conditions in place to fix the problem for the future?

      Comment


        #4
        Hello Aventeren,

        Thank you for your response.

        The message you have seen is in regards to historical trades that did not occur in real-time so the strategy is not disabled. The IOrder function would be order.OrderState, and you would look for the OrderState.Rejected: http://www.ninjatrader.com/support/h...nt7/iorder.htm

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X