Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error in NT8 when Closing a Trade using an External DOM (Jigsaw daytradr)

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

    Error in NT8 when Closing a Trade using an External DOM (Jigsaw daytradr)

    Hi,

    I am using the following platform combinations using 2 CQG logins connected to the same account.

    1) Ninjatrader 8 for charting (1st CQG connection)
    2) Jigsaw daytradr for execution (2nd CQG connection)

    In daytradr, I am using a simple OCO Strategy. However, when I move an order to close out a trade in this DOM, an NT8 Error pop-up appears for every trade closure! An example error window says:

    <Acct No>. The order was in a state that prohibited a cancel request affected Order: Sell 1 StopMarket @ 11628.5

    The trade closes out ok with no errors in Jigsaw, but NT8 still generates an error. How do I shut off this Error pop up message?

    I have tried assigning the SIM account in Chart Trader, and switching off Chart Trader completely, but I am still getting an error on utilising an external DOM.


    #2
    Hello synclavier,

    I would like to take a closer look at the error message and any additional information it produces, as this should help us track down what might be causing this.

    As the log & trace files contain personal data, such as your account number, I'd like to ask you to send it to us directly through the platform.

    To do this, please click on Help > Email Support, then leave the following note in the email:

    ATTN Manfred 2808590 - this allows us to associate your files with this post and assist you without delay.

    Thank you in advance, I look forward to your reply!
    Manfred F.NinjaTrader Customer Service

    Comment


      #3
      While I already replied to synclavier directly, I also wanted to leave a note in this post on what was causing this error message.


      First, to explain how the NinjaTrader Platform and CQG-based providers address OCO (one-cancels-other) orders.


      CQG supports native OCO orders. That means if an OCO order is submitted, CQG will handle the cancellation on their end.

      E.g.: A Stop Loss and Profit Target are submitted, one of them fills or cancels, CQG then automatically cancels the remaining order at the exact same time and reports the fill/cancellation back to the platform.


      NinjaTrader is also capable of handling OCO orders on the platform directly. This is essential, as not all providers support this feature.

      If an OCO order is submitted through NinjaTrader it will behave as follows:

      The Stop Loss and Profit Target are submitted as individual orders (not OCO-connected). As soon as NinjaTrader then receives the notice that one of the two was cancelled or filled, it submits a cancellation request for the remaining order.

      While this introduces a minor delay between the fill/cancellation of the first and second order, it enables the OCO functionality even if the brokerage does not support it.


      Knowing the differences between these two systems, it seems what occurs is then the following:
      1. An order is submitted externally for two OCO connected orders.
      2. NinjaTrader receives this information and plots both orders on the chart.
      3. One of the two orders now fills or cancels, causing CQG to first inform NinjaTrader of this fill/cancellation.
      4. While CQG now cancels the remaining order, NinjaTrader receives this notice and then submits a cancellation for the selfsame order.
      5. The exchange receives this cancellation request after it had already cancelled the order prior and replies, stating the order is not in a state that can be cancelled (as it is already cancelled).
      6. NinjaTrader then receives first the notice that it cannot cancel this order (resulting in the error message popping up), followed by the notice the other order has been cancelled externally, at which point it is removed from the chart.
      As such, the issue occurs simply due to the fact that NinjaTrader attempts to cancel an order that CQG already cancelled.

      One way to avoid this error message from occurring is to enable the "Local OCO Simulation" setting in CQG's connection settings:

      Click image for larger version

Name:	local oco.png
Views:	494
Size:	29.9 KB
ID:	1125140

      If this feature is enabled, the error would no longer occur. The downside of this setting, however, is that any orders NinjaTrader submits would not use CQG's native OCO-capabilities but instead execute these on the platform directly, potentially introducing this minor delay.

      While this delay should not cause any issues outside of a very volatile market or while experiencing connection issues, it could potentially lead to both orders being filled, if the market touches both before the NinjaTrader platform is able to receive the notification that one was cancelled and submit the cancellation for the remaining order.
      Manfred F.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Rapine Heihei, Today, 08:19 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      6 views
      0 likes
      Last Post Rapine Heihei  
      Started by f.saeidi, Today, 08:01 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 07:51 PM
      0 responses
      8 views
      0 likes
      Last Post Rapine Heihei  
      Started by frslvr, 04-11-2024, 07:26 AM
      5 responses
      98 views
      1 like
      Last Post caryc123  
      Working...
      X