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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X