Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Once Profit Target is Reached, Close Pending Stop Order

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

    Once Profit Target is Reached, Close Pending Stop Order

    Hi,

    What methods or properties should I look at in order to cancel a pending stop loss order once my profit target is reached?

    For example:

    I buy 100 units @ 100$
    I set the Stop Loss Order: Sell Stop 100 units @ 90$
    Then I set the Profit Taking Order: Sell Limit 100 units @ 120$
    The price then moves up and hits 120$, executing my Sell Limit 120$
    Now I need to make sure my Sell Stop 120$ is cancelled.

    I am currently using a modified version of the indicator named "PriceAlert" to send an SMS alert once a target is hit. If I sleep on it, I end up never closing a open order. That's dangerous.

    Thanks in advance.

    - Marcus Plexus
    Last edited by marcusplexus; 10-08-2010, 12:54 PM.

    #2
    Hello MarcusPlexus,

    OCO functionality is built-in with both ATM-based targets and stop losses, as well as NinjaScript Set statements. If one or the other is filled it will cancel the other.

    If you need to check fill state of a target or stop loss order, you can see the following sample for this:
    Monitoring Stop-Loss and Profit Target Orders
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      OCO seems to be working only when no orders are currently filled.

      But I'll have a look at what you posted.

      Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      590 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      342 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      555 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X