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
JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, Yesterday, 01:16 PM
|
3 responses
11 views
0 likes
|
Last Post
by cre8able
Today, 08:28 AM
|
||
Started by ChartTourist, Today, 08:22 AM
|
0 responses
6 views
0 likes
|
Last Post
by ChartTourist
Today, 08:22 AM
|
||
Started by LiamTwine, Today, 08:10 AM
|
0 responses
2 views
0 likes
|
Last Post
by LiamTwine
Today, 08:10 AM
|
||
Started by Balage0922, Today, 07:38 AM
|
0 responses
5 views
0 likes
|
Last Post
by Balage0922
Today, 07:38 AM
|
||
Started by JoMoon2024, Today, 06:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by JoMoon2024
Today, 06:56 AM
|
Comment