Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Auto Cancelled order limit

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

    Auto Cancelled order limit

    Hi,

    I'm working with IOrders, and BuyLimit orders, but NT rejects order constantly. This is the text from Output window

    Order='NT-00000/Sim101' Name='Compra1' State=PendingSubmit Instrument='$EURUSD' Action=Buy Limit price=1,372 Stop price=0 Quantity=1 Strategy='ejObjCompra' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68eb4da299a14c788d2abab48489b5a4' Gtd='01/12/2099 00:00:00'
    Order='NT-00000/Sim101' Name='Compra1' State=Accepted Instrument='$EURUSD' Action=Buy Limit price=1,372 Stop price=0 Quantity=1 Strategy='ejObjCompra' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68eb4da299a14c788d2abab48489b5a4' Gtd='01/12/2099 00:00:00'
    Order='NT-00000/Sim101' Name='Compra1' State=Working Instrument='$EURUSD' Action=Buy Limit price=1,372 Stop price=0 Quantity=1 Strategy='ejObjCompra' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68eb4da299a14c788d2abab48489b5a4' Gtd='01/12/2099 00:00:00'
    Order='NT-00000/Sim101' Name='Compra1' State=PendingCancel Instrument='$EURUSD' Action=Buy Limit price=1,372 Stop price=0 Quantity=1 Strategy='ejObjCompra' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68eb4da299a14c788d2abab48489b5a4' Gtd='01/12/2099 00:00:00'
    Order='NT-00000/Sim101' Name='Compra1' State=Cancelled Instrument='$EURUSD' Action=Buy Limit price=1,372 Stop price=0 Quantity=1 Strategy='ejObjCompra' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='68eb4da299a14c788d2abab48489b5a4' Gtd='01/12/2099 00:00:00'


    How could place an orderlimit place till executed?

    Thanks

    #2
    Hi Giger2000,

    Thank you for your post.

    You would need to use the Live Until Cancelled feature for the limit order.
    Take a look at the link below on Advanced Order Handling for the Live Until Cancelled orders
    Advanced Order Handling

    Additionally, take a look at this link below on how to use the code for the EnterLongLimit() with the Live Until Cancelled -
    EnterLongLimit()

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hi Giger2000,

      Thank you for your post.

      You would need to use the Live Until Cancelled feature for the limit order.
      Take a look at the link below on Advanced Order Handling for the Live Until Cancelled orders
      Advanced Order Handling

      Additionally, take a look at this link below on how to use the code for the EnterLongLimit() with the Live Until Cancelled -
      EnterLongLimit()

      Let me know if I can be of further assistance.
      I had tried with this code:

      protected override void OnBarUpdate()
      {
      if (entryOrder == null && Close[0] < Open[0])
      entryOrder = EnterLongLimit(0, true, 1, 1.367, "Buy1");



      }

      But didn't works. The orders has been cancelled

      Comment


        #4
        Giger2000,

        You will need to use TraceOrders = true; in the initialize() method and debug the code to see why the order is getting cancelled.

        With the Live Until Cancelled being set, NinjaTrader will not cancel out your order unless there is something else being implemented such as a CancelOrder() or EnterShort() being placed.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Cal View Post
          Giger2000,

          You will need to use TraceOrders = true; in the initialize() method and debug the code to see why the order is getting cancelled.

          With the Live Until Cancelled being set, NinjaTrader will not cancel out your order unless there is something else being implemented such as a CancelOrder() or EnterShort() being placed.
          I'he found found the problem!!!. I had Exitonclose=true

          Thks!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          666 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          376 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          110 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          580 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X