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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X