Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StopLoss stuck in Accepted? Is that OK?

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

    StopLoss stuck in Accepted? Is that OK?

    Hi!

    I am developing a strategy that uses unmanaged orders. The strategy issues a stop loss order soon after getting fulfillment events and updates the stop loss order as the entry order gets fulfillment. In the following debug log (from my code) you can see that the stop loss order, once issued moves from PendingSubmit state to Accepted state and then remains in Accepted state, never reaching Working state.

    This is all on a simulation account (not Sim101, but another one)

    I is my understanding from the documentation that Accepted should only be a transient state and that orders must be in Working state in order to actually trigger. I realize that this is a simulation account, and not a live broker, so I am confused as whether this is an OK situation or not. With a live trading situation, Accepted means that the order was acknowledged by the broker but is not in the exchange queue yet (meaning it will not trigger unless it is in Working state).

    So is this normal behavior for a simulation account?

    Part of the debug log follows (printouts are generally during OnBarUpdate, OnExecution and ONOrderUpdate):
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order update on [SellShort 2600 HAL (Accepted, 0 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order update on [SellShort 2600 HAL (Working, 0 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order update on [SellShort 2600 HAL (PartFilled, 1300 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order execution on [SellShort 2600 HAL (PartFilled, 1300 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order update on [SellShort 2600 HAL (Filled, 2600 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.13 : order execution on [SellShort 2600 HAL (Filled, 2600 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: PositionFilled stoploss state: null
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : << State machine (UpdatingTrailingStop): stop order not in working state - doing safety check >>
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : << State machine (UpdatingTrailingStop): no stop loss order yet >>
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : ... Issuing stop order at 38.2515704064 (requested price = 38.2515704064 , calculated stop price = 38.2515704064)
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 [BuyToCover 2600 HAL @38.25 (PendingSubmit, 0 filled)]: issued stop loss
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : << State machine (UpdatingTrailingStop): updating state machine callback for stop loss order updates >>
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: PendingSubmit
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: PendingSubmit
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: PendingSubmit
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: PendingSubmit
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: PendingSubmit
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : order update on [BuyToCover 2600 HAL @38.25 (PendingSubmit, 0 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : order update on [BuyToCover 2600 HAL @38.25 (Accepted, 0 filled)]
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.12 : sm state: UpdatingTrailingStop stoploss state: Accepted
    ... (many more identical updates)
    TrendFollower1: HAL: @ 2/22/2012 8:42:00 AM $38.09 : sm state: UpdatingTrailingStop stoploss state: Accepted
    ...

    #2
    Hi arnonmoscona,

    Yes, Accepted is the normal state expected for stop orders here and it should still trigger when the last traded price = stop price. You'll see this in simulation as well as live for stop orders. Order state definitions are available here.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    648 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X