Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy terminated upon Cancel order rejected

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

    Strategy terminated upon Cancel order rejected

    Hi there,

    I have been testing 2 strategies on my IB simulated account for a couple days, this morning one strategy was terminated by Ninja after its stop got hit. Earlier this morning, that strategy took a similar trade (target-1 filled / 2nd contract stopped) which had worked perfectly.

    I have attached the Ninja Log (failure trade & earlier normal trade) as well as TWS condensed audit trail (both are in the same Excel file).

    It appears that after the stop got it, Ninja sent a cancel request for the target-2, that cancel apparently got rejected by TWS (there is NO trace of that in the TWS log), Ninja shutdown the strategy, the next entry in the log is the cancellation for the target-2.

    This strategy uses Managed Orders, it opens 2 positions for each setup (in order to manage 2 independent targets).


    I am really unsure what went wrong under the hood, one thing is sure though - this needs to be fully understood & fixed, as I cannot and will not babysit Ninja 24/7 to restart strategies after such failures.


    Let me know if you need any more information.


    Thanks in advance
    Dominique
    Attached Files

    #2
    Hello,

    What was the reason for the cancel request getting rejected by IB to you know why they rejected it?

    Unfortunately this is expected behavior, if we get a Cancel Request rejected we will error out just like we would with any rejected order action with the managed approach.

    -Brett

    Comment


      #3
      Brett,

      My (limited) understanding is the following:

      - The target order was automatically cancelled by IB once the stop was triggered - which is expected, as long as the target & stop orders are OCO - can you confirm this point ?

      - For some *unknown* reason, Ninja decided to cancel the target upon being notified of the stop being executed. The Cancel order was sent by Ninja "at the same time" TWS was sending the Profit target order cancelled notification.

      - So when TWS received the Cancel from Ninja, that order was already cancelled, hence the rejection for that order.

      - Ninja processed the Profit target order cancelled notification just after that, but it was too late, it had already terminated the strategy.


      To recap:

      - please confirm that for managed orders target + stop as sent by Ninja are OCO

      - if this is indeed the case, you'll have to investigate why Ninja decided to cancel the target after receiving notification of the stop being executed.

      - if this is not the case, then I will take this to IB support to find out why the target order was cancelled at their end.

      Regards
      Dominique

      Comment


        #4
        Your analysis most likely is off as all OCO is handled by IB. Not by NinjaTrader, therefor NinjaTrader would not send a cancel request in since its handled by the broker.

        Can you please send your logs and trace files in to support ATTN: Brett in the subject line and line me know the time and date of the rejected order so that I can look into the true cause of whats going on here.

        -Brett

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        28 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        21 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        4 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Yesterday, 10:49 PM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X