Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stop Order Problems
Collapse
X
-
Stop Order Problems
I'm submitting a Stop Entry when some conditions are met, then when the entry order get filled i put a Stop order, but if the Low of the new bar is lower than my stop Exit order it wont exit and stay in a trade until the session finish, is there a way to fix it, or prevent it?.Tags: None
-
Originally posted by NinjaTrader_Bertrand View PostHi PrTester, did you let then run with TraceOrders = true in the Initialize? Maybe it's not picking it up correctly because the signal names do not match.
To answer the question the signal name its not the problem and work as expected all the time except when that condition occurs. Any idea how to fix it?
Comment
-
PrTester,
Please turn on TraceOrders = true. You should find your stop order to be rejected. You will need to program some logic to handle this. Perhaps resubmit at a lower price if rejected, or just have a lower stop to begin with.
In real-time things will be different since the low price should not influence the placement of your order unless the new bar gaps down significantly.Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Josh View PostPrTester,
Please turn on TraceOrders = true. You should find your stop order to be rejected. You will need to program some logic to handle this. Perhaps resubmit at a lower price if rejected, or just have a lower stop to begin with.
In real-time things will be different since the low price should not influence the placement of your order unless the new bar gaps down significantly.
Josh
I try the following snippet among others but no luck,
if( Position.MarketPosition == MarketPosition.Long
&& entryOrder != null
&& stopOrder.OrderState == OrderState.Rejected )
{
ExitLong();
}
any recommendations?,
Regards
Comment
-
PrTester,
First you need to determine if this is actually the case. I was throwing out possibilities earlier. You should be program to the OnOrderUpdate() method. When you receive the OrderRejected state for that particular order then you can submit your close position order.Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Josh View PostPrTester,
First you need to determine if this is actually the case. I was throwing out possibilities earlier. You should be program to the OnOrderUpdate() method. When you receive the OrderRejected state for that particular order then you can submit your close position order.
Just an update, I just exit the order if the condition exist and Current Bar is > My OrderBar + N bars. Can not make it work on the OnOrderUpdate() method, but it work.
Thanks, for your help as always .
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by WHICKED, Today, 12:56 PM
|
2 responses
14 views
0 likes
|
Last Post
by WHICKED
Today, 02:15 PM
|
||
Started by Felix Reichert, Today, 02:12 PM
|
0 responses
1 view
0 likes
|
Last Post Today, 02:12 PM | ||
Started by Tim-c, Today, 02:10 PM
|
0 responses
1 view
0 likes
|
Last Post
by Tim-c
Today, 02:10 PM
|
||
Started by cre8able, Today, 01:16 PM
|
2 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 01:40 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
3 responses
49 views
0 likes
|
Last Post Today, 01:29 PM |
Comment