Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

best practices in implementing bracket orders

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

    best practices in implementing bracket orders

    Hi experts

    Right now I am using this approach to implement bracket orders

    1a) EnterLongLimit() or 1b)EnterShortLimit()
    2) Wait for execution
    3) (1a) or (1b) executed
    4) In overloaded OnExecutionUpdate(), place the following bracket orders:
    4a) i) ExitLongLimit() + ii) ExitLongStopMarket() or
    4b) ii) ExitShortLimit() + ii) ExitShortStopMarket()
    5) Wait for execution of (4ai/ii) or (4bi/ii) for either profit taking or stoploss hit

    I am thinking what if at (2) my hard-disk crashed and I am not able to get back in the next 2 hours. (1a) or (1b) will be executed since order has been placed, but not (4a) or (4b) because my PC died and my Ninjascript strategy is no longer running. Ultimately I might face huge loss if market moves against me.

    Is my thought process correct? Would like to hear your input please.
    Or should I send in (4a) and (4b) together with (1a) and (1b) ? Is that a preferred approach ?
    Last edited by elirion; 01-02-2024, 09:25 PM.

    #2
    Hello elirion,

    Thanks for your post.

    Yes, that would be the best practice for submitting a profit target and stop loss order when the entry order is filled.

    Here is a reference sample demonstrating submitting protective orders using OnExecutionUpdate() and OnOrderUpdate(): https://ninjatrader.com/support/help...and_onexec.htm

    If this pertains to live orders and you see the behavior you noted, please always reach out to your broker's Orders Desk immediately to confirm and manage your live orders and positions.

    If your trade(s) are with NinjaTrader Brokerage, you can contact NinjaTrader Brokerage Order Desk by emailing orders[at]ninjatrader.com.​
    <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
      Thanks for the help NinjaTrader_BrandonH

      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