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 NullPointStrategies, Today, 05:17 AM
        0 responses
        52 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
        70 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