Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to do bidirectional entry orders and one step reversals

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

    How to do bidirectional entry orders and one step reversals

    My understanding is that with the managed approach you can't set two stop orders at the same time, one to enter a trade long and another to enter a trade short. Seems like that would be a perfect use of an OCO but I can't find any such ability. Is there an approach to emulate what I want to do? The behavior I desire is 1) to trigger one and leave the other active until the bar closes or 2) if one triggers but within the same bar the market reverses, I want to exit the first and enter in the other direction. If those two scenarios can't be done, perhaps if one triggers, cancel the other. Is this possible by any means?

    I tried using the unmanaged approach. That works but I also need to be able to reverse a trade with a single command, but I've learned you can't do that using a ChangeOrder by doubling the number of lots on the stop loss. Indeed, my tests totally fail when I try that. Instead I've been told you have to cancel an existing stop and then enter a trade in the opposite direction after getting confirmation of the cancel order. That doesn't make a lot of sense to me - did they really mean exit the trade and enter a new order? In either case, it takes too much time when working with small, intraday time frames. As it turns out, the managed approach handles reversals easily.

    I'm really frustrated trying to figure out how to do these two things with one of the approaches. Does anyone know how I can do these two things?

    #2
    So, you want to do both trades at the same time, see where the momentum goes and stick with that trade? But also, just cancel the one that doesn't work out?

    Comment


      #3
      Hello dweems,

      The one command reverse in the manage approach is just a convenience, you can do the same task by cancelling orders, closing the position and then opening a new position using the unmanaged approach. You are not losing any functionality by using the unmanage approach, you would do the exact same order actions to do a reversal as the managed approach you just have to submit the orders yourself because you are using the unmanaged approach.

      The unmanaged approach is the only way you would be able to do what you are asking, the managed approach will block submitting opposite orders at the same time.

      Comment


        #4
        To answer Schools​, no, I'm not opening 2 trades at once. I'm setting stop orders above and below the most recent bar and catching the movement of the market which ever direction it goes. And then, under certain circumstances, if I exit a trade and my metrics indicate the momentum is changing direction I perform a reversal with one command (which appears I can't do).

        Thanks NinjaTrader_Jesse​. So to do an unmanaged reversal, I'm assuming I would first exit the current trade and then perform a market order in the opposite direction? Do I have to do the market order from OnExecutionUpdate when I get confirmation of the exit or can I do that from OnOrderUpdate since that happens before OnExecutionUpdate? If possible I'd rather not perform the market order from OnBarUpdate as I want to reduce latency.

        Comment


          #5
          Hello dweems,

          Correct, you would close the position and then open a new position.

          To drive order logic OnExecutionUpdate would be used, that is how you can confirm the order you submitted to close the position was filled.

          Comment


            #6
            Many thanks

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            54 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            130 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            72 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            44 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            49 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X