Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

auto reverse trade when stop loss of open position is triggered

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

    auto reverse trade when stop loss of open position is triggered

    do you perhaps have a ninjascript code that i can use in my strategy, where once i place a marketbuyorder order marketsellorder with defined takeprofits and stop losses, once the stop loss is triggered, it immediately enters the same trade with same take profit and stop loss but in reverse direction? Thanks in advance

    #2
    Hello konganda,

    I am not aware of a specific working example of that but you can drive your strategies logic by using the OnExecutionUpdate override. That override shows any executions for orders that your strategy submits. You could use the fill event for the target to submit a new entry in the opposite direction.

    If this is something you wanted to try and make yourself a good starting point is to learn about the order events. You can find an example of making a strategy that uses its OnOrderUpdate and OnExecutionUpdate events here: https://ninjatrader.com/support/help...and_onexec.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X