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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    41 views
    0 likes
    Last Post CarlTrading  
    Working...
    X