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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
128 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
116 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
110 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
88 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment