This just occurred.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Stop order can't be placed above the bid
Collapse
X
-
Stop order can't be placed above the bid
In set 6 I set the StopPrice -1 tick behind the bid. Should I make it -2 ticks or is there more I can do?
This just occurred.Tags: None
-
Hello trdninstyle,
Thanks for your post.
This error message means that the strategy attempted to place an order on the wrong side of the market. Buy stop orders must be placed above the current ask price. Sell stop orders must be placed below the current bid price.
If this is due to market volatility then there isn't really a way to 100% avoid this occurring, as in volatile markets the market could move so far and fast that this would occur.
You could consider placing your stop loss further from the current price to correct this error.
I would recommend you add prints to the strategy to determine why the stop order is being rejected. Prints should be added to the script that print out the value you are submitting your stop loss order to and prints out the current market price (Close[0]). This will allow you to see where the order is trying to be placed in comparison with the current market price.
Below is a link to a forum post that demonstrates using prints to understand behavior.
https://ninjatrader.com/support/foru...121#post791121
Something else you could consider is changing the strategy to use StopCancelCloseIgnoreErrors for its error handling. You could then capture the rejection in OnOrderUpdate, and then either try to resubmit the stop at a different price or submit an exit order to close the position. Note that this would require unlocking the strategy from the Strategy Builder and manually programming your logic.
You can find more information about real-time error handling for strategies here, along with an example of capturing the rejection:
https://ninjatrader.com/support/help...orhandling.htm
Let us know if we may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
Hello BrandonH,
'Changing the strategy to use StopCancelCloseIgnoreErrors for its error handling. You could then capture the rejection in OnOrderUpdate, and then either try to resubmit the stop at a different price or submit an exit order to close the position.'
This sounds very interesting, plus what u said about the market when it's volatile that it just happens. Then I would just reset it. The other day it went the entire day without that happening so it could be that it was too volatile. But what if I set the bid at -2 tick size instead of -1 tick size. Could that have any bearing?
Thanks for your tip. Bill
Comment
-
Hello Bill,
Thanks for your note.
Increasing the stop loss by one extra tick would place the stop loss 1 more tick away the price that it is currently being submitted to.
Ultimately, you would need to test your strategy to determine if that one extra tick will keep the order rejection error from occurring. If the order rejection error continues to occur when testing, you may need to place your stop order further from the current price.
Further, prints should be added to the script that prints out the value you are submitting your stop loss order to and prints out the current market price (Close[0]). This will allow you to see where the order is trying to be placed in comparison with the current market price. Then you could modify your stop loss accordingly.
Below is a link to a forum post that demonstrates using prints to understand behavior.
https://ninjatrader.com/support/foru...121#post791121
Let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
I mean this thing, that ensures for the most part my stop stays 1 tick below the bid. Not the actual stop loss. If I set a further stop for all the time it will get hit on those reversals.
The opposite direction entry will cancel out my stop for the upside and vice versa.
So, what I meant was, for the -1 tick behind the bid, could I make it -2 or a higher #?
StopPrice = (GetCurrentBid(default input) + (-1 *TickSize));
BTY have a good holiday tomorrow. If it's late get back to me on Friday or Monday.Last edited by trdninstyle; 11-23-2022, 03:21 PM.
Comment
-
Hello trdninstyle,
Thanks for your note.
Yes, that is correct. You could set the StopPrice to use the Bid price minus 2 ticks or more to meet your goal.
Note that in volatile markets the market could move so far and fast that this error could still occur so you would need to test your strategy to ensure it behaves as you want it to.
I hope you have a good holiday too. Please let me know if you have further questions.
<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
- Likes 1
Comment
-
Okay that what I'll do, it's good to know that I can do that. I don't want to try something without knowing for sure if thats what it's meant to do.
You too buddy. Have a good one. Thanks.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment