Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Why do I keep getting this error message?
Collapse
X
-
Why do I keep getting this error message?
it was on a strategy how do I fix this? I made it ignore all errors on the stratetgy1 PhotoTags: None
-
The message is quite literal. This indicates that a sell stop market order was placed on the incorrect side of the market. I recognize this exact question and screenshot from an earlier inquiry. Did you reach out to us via email? If so, we replied to you shortly after you first wrote in. If you didn't receive that email, check your junk/spam folders for messages from NinjaTrader and ensure that they're allowed to arrive in your inbox.
If I am mistaken, we can continue here on the forums. Please answer all of the following questions:- What version of NinjaTrader 8 are you using? Please provide the entire version number. This can be found under Help -> About (Example: 8.0.X.X)
- What does "I made it ignore all errors on the stratetgy" mean exactly?
- Are these orders being submitted manually via ATM strategies? Or are you referring to fully automated NinjaScript strategies?
-
1. 8.0.16.3
2. this is what i mean RealtimeErrorHandling = RealtimeErrorHandling.IgnoreAllErrors; I have that in my code dont know if that helps
3. Ninjascript strategy
Comment
-
Hello rickyblah12,
The error message is stating that a sell stop market order was placed above the bid price.
No brokerage will accept a sell stop market order above the bid price.
You will need to ensure the stop price for the order is less than the current bid price.
You can use GetCurrentBid() to ensure that your stop price is below this bid price.
Below is a public link to the help guide.
Chelsea B.NinjaTrader Customer Service
Comment
-
-
-
-
Hello rickyblah12,
You can use GetCurrentBid() in a condition that leads to the order being placed.
double myCalculatedPrice = 100;
if (myCalculatedPrice < GetCurrentBid() - TickSize)
ExitLongStopMarket(myCalculatedPrice);
Or you could use Math.Min() and take whichever is less
ExitLongStopMarket(Math.Min(myCalculatedPrice, GetCurrentBid() - TickSize));Chelsea B.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_ChelseaB View PostHello rickyblah12,
You can use GetCurrentBid() in a condition that leads to the order being placed.
double myCalculatedPrice = 100;
if (myCalculatedPrice < GetCurrentBid() - TickSize)
ExitLongStopMarket(myCalculatedPrice);
Or you could use Math.Min() and take whichever is less
ExitLongStopMarket(Math.Min(myCalculatedPrice, GetCurrentBid() - TickSize));
Comment
-
I used the strategy builder to create the stop loss...what do you think would be the issue for this error if im using the default stop loss from the builder
Comment
-
ok...do u think since the volatility is high...when I put a 5 tick stop loss thats why i get that error?
Comment
-
Hello rickyblah12,
Depending on the market and price used, yes. The message is specifically what happened in this case.
Can you detail how you set the stop in the builder and what instrument this was? An image of your stop in the builder would be helpful, depending on the instrument and its tick size 5 ticks may or may not be too close to the active market, this could also deal with how the stop was set
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GwFutures1988, Today, 02:48 PM
|
1 response
5 views
0 likes
|
Last Post Today, 03:09 PM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
6 responses
30 views
0 likes
|
Last Post
by ScottWalsh
Today, 02:57 PM
|
||
Started by frankthearm, Today, 09:08 AM
|
10 responses
36 views
0 likes
|
Last Post
by frankthearm
Today, 02:54 PM
|
||
Started by mmenigma, Today, 02:22 PM
|
1 response
3 views
0 likes
|
Last Post Today, 02:34 PM | ||
Started by NRITV, Today, 01:15 PM
|
2 responses
9 views
0 likes
|
Last Post
by NRITV
Today, 01:51 PM
|
Comment