Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Order Entry Error

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

    Order Entry Error

    I keep getting the following error message:
    "An order has been ignored since the stop price ‘2010.25’ near the bar stamped ‘1/13/2015 12:20:00 PM’ is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored."

    This is coming from "SubmitOrderUnmanaged()", Sell, StopMarket on the 1 tick series; the primary series is the ES 1 minute. eg, my StopMarket price is 2010.25, and the Lows[0][0] = 2010.75, so this should work, right (ie, that the StopMarket price is below the low of the most recent bar; I've also tried Lows[1][0], but get the same error)?


    #2
    Hi, thanks for posting. The stop price is invalid, likely in historical data. Since its a Sell Stop order the price used needs to be below the open of the bar. Try using this variable as your stop price:
    Code:
    double stopPrice = Math.Min(Lows[1][0], GetCurrentBid() - TickSize);

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    172 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    88 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    128 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    208 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X