Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Pending Order

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

    Pending Order

    Hi, I want to send a pending order when the market reaches a certain price.

    Is this possible ?

    Regards.

    #2
    Order Pending

    Hi.

    Code:

    if ( Price = touch_price )

    { EnterLong (0,true,contrats,Close[0]+DistanceMarket*TickSize,"Open Long 1");}

    Regards.

    Comment


      #3
      Hello,

      Thanks for the forum post.

      What exactly do you mean by Pending Order? Do you mean sending an order to the exchange to be filled?

      Are you asking about sending a stop order?

      I look forward to assisting you further.
      BrettNinjaTrader Product Management

      Comment


        #4
        Hi, when the price arrive to 1,2300, send a order pending long in 1,2305

        When the price arrive to 1,2305, enterlongstop.

        Can you help me to write the code ?

        Regards.

        Comment


          #5
          You could approach it like this -

          if (Close[0] == xxx)
          EnterLongLimit / StopLimit / Stop

          if (Close[0] == xxx and Position.MarketPosition = MarketPosition.Flat)
          EnterLongLimit / StopLimit / Stop

          Basically if you just resend the order at a new price, but keep the name intact, NinjaTrader would just update it and there would be no need for your to CancelOrder() it specifically.

          If the MarketPosition check on each OnBarUpdate() is not granular enough for your task, you can always work with the IOrder objects to check the fillstates directly in OnOrderUpdate() / OnExecution() -

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          574 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X