Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order have been ignored in SubmitOrderUnmanaged

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

    Order have been ignored in SubmitOrderUnmanaged

    In my strategy. I use SubmitOrderUnmanaged to sumbit my order.

    However, it just show me
    An order has been ignored since the stop price ‘8569.5’ near the bar stamped ‘17/4/2020 5:00:00 AM’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored.

    Because of this, it actually delay my order for stopOut as it ignore the stop price.

    Can i know why ??
    and
    How to overcome this ??

    #2
    Hello soon123,

    Thank you for your post.

    Are you seeing the error message when running the strategy using historical data or real-time data in a chart?

    Are you running the strategy using Playback with market replay data? Or, are you running the strategy using the Strategy Analyzer?

    A buy stop order must have a stop price above the Ask and a sell stop order must have a stop price below the Bid.

    In order to better understand how the code is working, I recommend adding some debugging prints to your strategy. By adding debugging prints above the conditions in your script, you could evaluate the values being used by your strategy's logic.

    If you are seeing your order submission being reached, but it is not executing, there may be an issue where the strategy is hitting an internal rule that is not allowing you to re-enter. TraceOrders can be used in the strategy (set in State.SetDefaults) so it prints order feedback, and you may also observe the log tab of the Control Center for additional information.

    Additionally, please refer to the UnmanagedTemplate example script in the forum post linked below which demonstrates how an Unmanaged strategy could be written. You may also use this template for any debugging and personal development.

    UnmanagedTemplate - https://ninjatrader.com/support/foru...ing#post830530

    Please let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      I didnt see any error message in a chart.

      I am using historical data to test my strategy (NQ 12 - 20)

      I actually got do the debugging print to see the ordertstate of the order. But when it reach there (that particular bar) , it exit all my program.

      Can i know what is TradeOrder setting ??

      Comment


        #4
        I have used the TradeOrder setting in State.SetDefaults.

        It show me :
        Code:
        17/4/2020 5:00:00 AM Strategy 'aaMAllBarStrategy02/215341301': Ignored SubmitOrderUnmanaged() method at 17/4/2020 5:00:00 AM: BarsInProgress=0 Action=BuyToCover OrderType=StopMarket Quantity=10 LimitPrice=0 StopPrice=8706.00 SignalName='Stop Short' FromEntrySignal='' Reason='Invalid order price, please see log tab'
        I do not understand why my price is invalid and also the price is falls between the bar price also.

        Comment


          #5
          Hello soon123,

          Thank you for that information.

          The order might be returning invalid because the price that is set in the strategy falls between the bar. Buy stop orders must have a stop price placed above the Ask.

          If you are still experiencing the same error after changing the stop price to be placed above the Ask, please send us a reduced example script which demonstrates the behavior you are seeing.

          Please let us know if we may assist further.
          Brandon H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hyper, Today, 05:23 PM
          0 responses
          4 views
          0 likes
          Last Post Hyper
          by Hyper
           
          Started by ballboy11, Today, 05:20 PM
          0 responses
          4 views
          0 likes
          Last Post ballboy11  
          Started by Hyper, Today, 03:02 PM
          1 response
          16 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by aworldnervelink, Yesterday, 11:55 AM
          7 responses
          41 views
          0 likes
          Last Post NinjaTrader_Kate  
          Started by PhilT, Today, 02:18 PM
          4 responses
          19 views
          0 likes
          Last Post PhilT
          by PhilT
           
          Working...
          X