No announcement yet.

Partner 728x90


Brackets when offline

  • Filter
  • Time
  • Show
Clear All
new posts

    Brackets when offline

    When I have a live order that has brackets (target and stop) from a custom ATM strategy and I go OFFLINE, meaning that NT7 is not running, do these brackets still get filled when the market reaches one of them?


    Hello Yaron,

    When being disconnected from the Internet, any orders in a working or accepted state on the brokerage/exchange servers will remain working and can be filled by the broker or on the exchange (just as any order you would call in to your broker would remain working).

    However, any actions from NinjaTrader will not take place.

    If an entry order is working with an active Atm Strategy applied, and then internet is lost and remains disconnected as the order fills, or if the computer is allowed to sleep or hibernate, NinjaTrader will not be able to submit the profit target or stop loss (no signal would be sent back to NinjaTrader informing that the entry has filled, also NinjaTrader would not be able to communicate to the brokerage to submit the stop loss or profit target). The position will be unprotected as no stop loss or profit target will have been submitted.

    This would also apply to any orders that must be submitted by NinjaTrader such as Market If Touched (MIT) orders and Simulated Stop orders. These orders are not submitted to the brokerage/exchange until they are touched. Once touched NinjaTrader sends the order to the exchange where it becomes working on the exchange servers.

    NinjaTrader needs a constant steady internet connection to receive data and to place or modify orders. If the computer is off, sleep, or hibernating NinjaTrader will be disconnected from the Internet.

    With NinjaTrader 7 as the internet connection is regained, the original entry order would still show as working as NinjaTrader never got the signal that the entry order had filled. At this point the connection would need to be manually disconnected and reconnected to show the entry order as filled.

    (This behavior has been corrected in NinjaTrader 8 in that when the connection is regained the order will update and show as filled and will not show as working. However, the effect with the Atm Strategy is the same in that no stop loss or profit target will have been submitted and the position will be unprotected.)

    If an entry order is working with an active Atm Strategy and then the internet is lost, but is then regained before the entry order has filled (meaning as the internet connection is regained and the entry order is still working on the exchange) then the Atm Strategy will still be active, however, no Atm Strategy actions will have taken place. This means break-even movements, trailing stop movements, local OCO simulation, and simulated orders will not be possible when the internet connection is lost.

    When the entry order does fill as long as there is still a currently connected steady internet connection, then the Atm is still active and the profit target and stop loss will be submitted. This order will be protected.

    If an entry order is working with an active Atm Strategy and the order fills and the profit target and stop loss are submitted and enter a working / accepted state, these orders are now on the exchange. If the internet connection is lost after this, these orders will continue working but all stop strategy logic (if selected with the Atm Strategy) controlling the stop loss will cease. The order is still there protecting the position, but any trailing action would stop as NinjaTrader would not be able to communicate the change order requests to move the order.
    Once the internet connection is regained, the trailing action would resume.

    If Native OCO is used (meaning OCO IDs are submitted to the exchange with the order) the exchange will perform OCO and cancel any opposing paired orders with an order that is filled or cancelled.
    If Local OCO is used (meaning no OCO ID is sent to the broker and instead OCO is done on the local computer by NinjaTrader receiving a message that an order has filled or cancelled and then NinjaTrader sends cancellation requests to the exchange to cancel the opposing orders) the exchange will not perform the OCO, and any opposing orders will not be cancelled and will continue working.

    Think of NinjaTrader as a person that is picking up the phone and calling your broker to place orders on your behalf. Likewise, the internet connection is similar to the phone line. If you call your broker and place an order, and you phone line goes dead you can no longer call to cancel, modify, or manage that order or place an opposing order to use as a stop or target. Similarly, if the internet connection is lost, NinjaTrader can no longer contact the broker to submit, change, or cancel orders. If a person falls asleep or dies, they can no longer call your broker and place orders on your behalf. If NinjaTrader is off or the computer is asleep NinjaTrader cannot place or manage orders or get messages that the state of an order has changed.
    (Hopefully your actual phone still works in this scenario and you can immediately pick up the phone and call your broker and manage the position if the internet connection is lost)

    This means, never allow the computer to sleep or hibernate while NinjaTrader is running. (This can be set in the Windows Control Panel > Power Options)

    This behavior also applies to fully automated NinjaScript Strategies.
    While connection is lost, no data will be received to run NinjaScript Strategies.
    If the connection becomes fully disconnected, or if there number of re-connection attempts exceeds the amount allowed in the 'Number of restart attempts' setting within the the number of minutes set in the 'Restarts within x minutes' setting, the strategy will become disabled and need to be re-enabled.

    Last, this also means that orders placed to the Sim101 or any other local simulation account will not fill while NinjaTrader is not on and connected for real-time data. Should an order be placed and then NinjaTrader is not on and connected, that order will fill with the first incoming tick price once NinjaTrader is back on and reconnected to the real-time data feed. This means you may see order fills extremely far from the stop or limit price.
    Last edited by NinjaTrader_ChelseaB; 01-25-2023, 01:59 PM.
    Chelsea B.NinjaTrader Customer Service


      First of all, many thanks for the detailed answer. Just to make sure we understand each other because I think you answered my question in the last paragraph but I want to make 100% sure - let's say I placed an ATM strategy order, it got filled, target and stop ordered of the strategy are in place and THEN I lose internet connection. The stop and target will still be filled even if I don't have an internet connection since they are placed with the exchange?

      I am asking this because I will be traveling a lot in the few next months and I will have filled orders running and will surely lose connection after they are filled....

      Many thanks!


        Hello Yaron,

        An order that is in a working or accepted state on the exchange will continue to be in that state and can fill when the internet is disconnected (including a stop and target).

        No order submissions or order changes will be applied such as trailing movements or break-evens or submission of stops and targets..
        Chelsea B.NinjaTrader Customer Service


        Latest Posts


        Topics Statistics Last Post
        Started by BartMan, Today, 07:53 PM
        0 responses
        Last Post BartMan
        by BartMan
        Started by Jazzman53, 03-29-2023, 07:23 PM
        2 responses
        Last Post Jazzman53  
        Started by kezyclaire, 03-29-2023, 12:01 AM
        6 responses
        Last Post BartMan
        by BartMan
        Started by ChrisR, Yesterday, 09:24 PM
        3 responses
        Last Post ChrisR
        by ChrisR
        Started by balltrader, Today, 10:06 AM
        6 responses
        1 like
        Last Post QuantKey_Bruce