Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close all positions ONLY if stop rejected, NOT target rejected

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

    Close all positions ONLY if stop rejected, NOT target rejected

    I have a strategy that enters 3 separate entry orders per direction. I want the strategy to havethe following behavior:

    1. If ANY of the stoploss orders (one for each entry) gets rejected, I want the strategy to close down all trades and cancel any pending orders. I know that if I use RealtimeErrorHandling = RealtimeErrorHandling.StopCancelClose then this is what I get.

    However, I also want this:

    2. If a profit target order is rejected (since maybe price moved beyond that profit target already), then I want ONLY THAT ENTRY order to close at market. I want the strategy to keep running and have the two other entries still open.

    How can I do this?

    #2
    Hello westofpluto,

    Thanks for your post.

    You could place a Limit order for the profit target order so that the Limit orders will fill if the market price is better than the price of the Limit order.

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      So, just to confirm, if I place a limit order to close a long trade, but when I place that limit order the price has already moved above the limit price, then the limit order will NOT be rejected. Instead it will fill at that new better price. Correct?

      So are there any circumstances in which a limit order (target order) would be rejected?

      Comment


        #4
        Hello westofpluto,

        Thanks for your note.

        Yes, that is correct. If a limit order is placed to close a long trade and the current market price is better than the limit order, the limit order will be filled.

        I am not sure what all the reasons are that could cause a Limit order to reject but there are certain moves you can make for certain types of orders where the order is on the wrong side of the market and gets rejected.

        Let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        64 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X