Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
auto reverse trade when stop loss of open position is triggered
Collapse
X
-
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 advanceTags: None
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment