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!
See more
See less

Partner 728x90

Collapse

"“Sell stop or sell stop limit orders can’t be placed above the market" error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "“Sell stop or sell stop limit orders can’t be placed above the market" error


    Folks, I'd like to better understand the resolution for this error:

    “Sell stop or sell stop limit orders can’t be placed above the market. Strategy submitted an order that generated the following error - order rejected....”

    I've seen this issue discussed frequently on the forum. You provide quality responses, which I appreciate. For my code, testing in Playback, I was able to eliminate this error by changing the code from:

    EnterShort()

    to

    EnterShortStopMarket(GetCurrentBid())

    I'm happy to have this fixed, but it still leaves me wondering why this error happens in the first place? Since EnterShort places an order at the market price, then how can the price be submitted above the market price? Thanks,



    #2
    Hello timmbbo,

    Thanks for your post.

    Sell stop and sell stop limit orders must be placed below the current bid price. If they end up being submitted above the market, this error will occur.

    Note 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.

    I would recommend you add prints to the strategy to determine why the stop order error is occurring. One line above where the stop order is placed, print the GetCurrentBid() and print the price being submitted to the order method.

    Below is a link to a forum post that demonstrates using prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    Something you could consider is using GetCurrentBid() to offset orders so that they are more likely to land on the correct side of the market.

    Or, you could place your stop order further from the current price.

    See the help guide documentation below for more information.

    GetCurrentBid(): https://ninjatrader.com/support/help...currentbid.htm​​
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rhyminkevin, Today, 04:58 PM
    1 response
    29 views
    0 likes
    Last Post Anfedport  
    Started by iceman2018, Today, 05:07 PM
    0 responses
    4 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    6 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    49 views
    0 likes
    Last Post futtrader  
    Working...
    X