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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          59 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          161 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          97 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          283 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X