Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reverse Open Order, Bid/Ask Order

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

    Reverse Open Order, Bid/Ask Order

    I am using a Managed Approach and have a couple of questions.

    I was wondering if there is a Method that I can use in a Managed Approach that will Reverse an open order, like the REV button in the DOM?

    I was wondering if there is a Method that will use the current Bid or Ask price in placing an order in a Managed Approach?

    #2
    Hi DenMan,

    All the managed entry methods will reverse a position.


    You can access bid and ask with GetCurrentBid() or GetCurrentAsk(). Their values can be placed in any order that accepts a price-- limit, stop, or stoplimit orders.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      REVERSE: Does that mean that if I have an Open Order that I placed with EnterLongLimit() that if I place another order with EnterShortLimit() it will close out the Open Long order and place a Short order?

      BID/ASK Pricing: Thanks!

      Comment


        #4
        Yes, that is what it will do. One thing to be aware of in this case is that internal order handling rules will prevent submission of the limit order if it considers there to be competing orders, like a working order placed by SetProfitTarget()

        More information on internal order handling rules is available at this link:
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          I tried the following code to close an existing Short order, the turn around to place a Long order:
          ExitShort();
          EnterLongLimit(1,GetCurrentAsk());
          The Order was closed properly, but the long order wasn't placed. (I suspect the Managed Approach isn't letting me close an order and place another in the same FirstTickOfBar.) What I want to do is close out the Short order and put a Long order in it's place.

          Comment


            #6
            To check what's going on, enable TraceOrders = true; in strategies Initialize() method, and monitor for messages under Tools > Output Window. This will tell you if any orders are ignored.

            EnterLongLimit() will take care of the reversal, but if you have working exits then it may require advanced handling to cancel these and then submit the limit order.

            If you wanted to do it in two commands -- first ExitShort(), then EnterLongLimit(), you have to wait until the position is flat before submitting the entry order.
            Ryan M.NinjaTrader Customer Service

            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
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            573 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            575 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X