Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT entered order with negative price

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

    NT entered order with negative price

    I am running a strategy which failed and shut itself down earlier today.

    I've included the logs and the trace file and an excel spreadsheet of the orders showing the bad order.

    It looks pretty messed up. The strategy uses the managed order system.

    This is NT7 b16 with IB TWS 900 on Win7-64

    Thanks
    Attached Files

    #2
    adamus,

    You will need to debug your strategy for that trade and see why it submitted the order at that price.

    Code:
    04/06/2010 14:57:58|1|32|Order='29f274cacf60499aa9e295b2569ee103/DU58298' Name='exit long stp' New state=PendingSubmit Instrument='$EURUSD' Action=Sell Limit price=0 [COLOR=Red][B]Stop price=-0.0013[/B][/COLOR] Quantity=0.15M Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
    04/06/2010 14:57:58|1|32|Order='29f274cacf60499aa9e295b2569ee103/DU58298' Name='exit long stp' New state=Accepted Instrument='$EURUSD' Action=Sell Limit price=0 [COLOR=Red][B]Stop price=-0.0013[/B][/COLOR] Quantity=0.15M Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
    04/06/2010 14:57:58|1|32|Order='29f274cacf60499aa9e295b2569ee103/DU58298' Name='exit long stp' New state=Rejected Instrument='$EURUSD' Action=Sell Limit price=0 [COLOR=Red][B]Stop price=-0.0013[/B][/COLOR] Quantity=0.15M Type=Stop Filled=0 Fill price=0 Error=OrderRejected Native error='Error validating request:-'ub' : cause - Negative stop price is not supported (321)'
    04/06/2010 14:57:58|0|32|InteractiveBrokers, Error validating request:-'ub' : cause - Negative stop price is not supported (321) affected Order: Sell 150000 Stop @ -0.0013
    Logs state your strategy submitted the order at the given price. Please add Print() and use TraceOrders = true in your strategy to try and isolate where the stop price was being generated from.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,
      I backtested and optimised and walked forward this strategy over 10 years of hourly data, and I never got a negative price on an order. I will run TraceOrders=true on the strategy if I have to, but have a look at the order details in the Excel file.

      See the order id? That says to me that something is seriously up the creek with NT. I didn't choose that ID, I had no control over it. Perhaps it's the ID from IB? I don't know, perhaps you can tell me.

      Comment


        #4
        adamus,

        Just because it is a long ID doesn't signify any issue. The IDs are generated uniquely and as long as they are unique they are generally fine.

        For your issue only through Print()s to track your variable states and tracking what exactly is being submitted from where in your code along with TraceOrders = true will you be able to understand what has happened.

        You can add a Print() before every Enter() or Exit() method along with the stop/limit prices you are submitting at and then you can analyze it along with TraceOrders to see what the price was submitted at and what the price was received as.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Josh,

          is this order trace really saying my strategy entered an order for amount == zero?


          04/06/2010 21:01:01 Entered internal PlaceOrder() method at 04/06/2010 21:01:01: Action=Sell OrderType=Market Quantity=0 LimitPrice=0 StopPrice=0 SignalName='exit long @mkt' FromEntrySignal=''

          Comment


            #6
            adamus,

            That is precisely what it is saying and that would be a problematic order. I suggest you check your order quantity variables prior to that TraceOrders output.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            601 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            347 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            559 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            558 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X