Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjatrader with IB gateway error "your order was repriced so ..."

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

    Ninjatrader with IB gateway error "your order was repriced so ..."

    Hello!
    I have a new enviroment with ninjatrader using IB gateway for trade Futures, MNQ in this case.
    I'm receving the error "your order was repriced so as not to cross a related resting order" when a previuos trade reach the stop loss and a new one is created. Leving the new Long or Short alive but without the new stopLos.
    I have other enviroment with ninjatrader platform and ninjatrader broker running the same ninjascript strategy without any problem.
    I only can found one diference between the logs.
    After reach the stop loss in the first trade in ninjatrader with IB gateway I found this line:
    Instrument='MNQ 12-22' Account='xxxx1' Average price=0 Quantity=0 Market position=Long Operation=Remove
    And in the other enviroment I found this:
    Instrument='MNQ 12-22' Account='xxxx2' Average price=0 Quantity=0 Market position=Flat Operation=Remove
    ​In bouth enviroments the StopLoss was reach and the trades canceled.
    Could some one help me?
    Thanks in advance
    Fabián
    Attached Files

    #2
    Hello Fabián,

    Thank you very much for your post!

    We would like to take a closer look at your platform's log & trace files, as they should give us a further indication of why this would occur.

    You can send us these files by going to the Control Center -> Help -> Email Support

    Please select "Platform Technical Support" as the recipient and enter a brief "ATTN 03522200" note in the message.

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

    Comment


      #3
      Is there a fix for this problem? Currently using TWS connection.

      I have similar issue with trading when using the atm strategy. Enter one entry and stop/ target brackets are entered. If I add another contract then it gets a fill, but this error occurs and no additional brackets.

      Here is a video I made of the issue:


      Here is the log from this trade:
      1/3/2024 3:21:10 PM Order Chart Trader submitting order with strategy 'Basic both sides 40 pt - 4' (Ticks)
      1/3/2024 3:21:10 PM Order Order='30ac794d0c9b49c595030b3ec7100468/XXXXXX' Name='Entry' New state='Submitted' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='1377475073/XXXXXX' Name='Entry' New state='Accepted' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='1377475073/XXXXXX' Name='Entry' New state='Working' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=16550.5 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Execution Execution='NQ 03-24/00019125.65958169.01.01' Instrument='NQ 03-24' Account='XXXXXX' Exchange=Globex Price=16550.5 Quantity=1 Market position=Long Operation=Operation_Add Order='1377475073' Time='1/3/2024 3:21 PM'
      1/3/2024 3:21:10 PM Position Instrument='NQ 03-24' Account='XXXXXX' Average price=16559.11 Quantity=1 Market position=Long Operation=Update
      1/3/2024 3:21:10 PM Order Order='1377475073/XXXXXX' Name='Entry' New state='Filled' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=16550.5 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order XXXXXX, Order Message: BUY 1 NQ MAR'24 Warning: Your order was repriced so as not to cross a related resting order. affected Order: Buy 1 Market
      1/3/2024 3:21:10 PM Order Order='1377475073/XXXXXX' Name='Entry' New state='Rejected' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=16550.5 Error='Order rejected' Native error='Order Message: BUY 1 NQ MAR'24 Warning: Your order was repriced so as not to cross a related resting order.'
      1/3/2024 3:21:10 PM Position Instrument='NQ 03-24' Account='XXXXXX' Average price=16554.805 Quantity=2 Market position=Long Operation=Update
      1/3/2024 3:21:10 PM Order Order='1377475073/XXXXXX' Name='Entry' New state='Filled' Instrument='NQ 03-24' Action='Buy' Limit price=0 Stop price=0 Quantity=1 Type='Market' Time in force=GTC Oco='' Filled=1 Fill price=16550.5 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='38b3750d5f3a40a1a0de9f0925a61bc0/XXXXXX' Name='Stop1' New state='Submitted' Instrument='NQ 03-24' Action='Sell' Limit price=0 Stop price=16540.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='d34c812daab04594a7006946a348bd41/XXXXXX' Name='Target1' New state='Submitted' Instrument='NQ 03-24' Action='Sell' Limit price=16560.5 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='1377475074/XXXXXX' Name='Stop1' New state='Accepted' Instrument='NQ 03-24' Action='Sell' Limit price=0 Stop price=16540.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='1377475074/XXXXXX' Name='Stop1' New state='Accepted' Instrument='NQ 03-24' Action='Sell' Limit price=0 Stop price=16540.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='1377475074/XXXXXX' Name='Stop1' New state='Cancel submitted' Instrument='NQ 03-24' Action='Sell' Limit price=0 Stop price=16540.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''
      1/3/2024 3:21:10 PM Order Order='d34c812daab04594a7006946a348bd41/XXXXXX' Name='Target1' New state='Rejected' Instrument='NQ 03-24' Action='Sell' Limit price=16560.5 Stop price=0 Quantity=1 Type='Limit' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='Order rejected' Native error='Order rejected - reason:OCA order cancel'
      1/3/2024 3:21:10 PM Order XXXXXX, Order rejected - reason:OCA order cancel affected Order: Sell 1 Limit @ 16560.5

      1/3/2024 3:21:11 PM Order Order='1377475074/XXXXXX' Name='Stop1' New state='Cancelled' Instrument='NQ 03-24' Action='Sell' Limit price=0 Stop price=16540.5 Quantity=1 Type='Stop Market' Time in force=GTC Oco='ab1604d9df63437c9f993c09b0c8064d' Filled=0 Fill price=0 Error='No error' Native error=''​

      Comment


        #4
        Hello metical1,

        Thank you for your post.
        The error mentions a 'related resting order', so I would like to take a look at the full logs to investigate further.

        I'm happy to check into this with you if you would please email us at Support [AT] NinjaTrader [DOT] com. In your message, please include a link to this forum thread and a message 'ATTN Eduardo'. Additionally, please follow the steps below to manually attach your log and trace files to your response:
        • Right-click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
        • Send the 2 compressed folders as attachments to this email.
        • Once complete, you can delete these compressed folders.
        Thank you in advance; I look forward to resolving this item.
        Eduardo R.NinjaTrader Customer Service

        Comment


          #5
          i have this issue too all the time. Even when IBKR gives this "Cross resting order" message, IBKR executes the order. Ninja seems to assume it was a rejection, closes position and terminates strategy, resulting in an unwanted/unprotected reverse position..

          Comment


            #6
            Hello madb123,

            Thank you for your post.

            If you would like, I can review your platform files to investigate further.
            Please email us at Support [AT] NinjaTrader [DOT] com. In your message please include the last time this occurred, a link to this forum thread, and a message 'ATTN Eduardo'.
            Additionally, please follow the steps below to manually attach your log and trace files to your response.
            • Open your NinjaTrader folder under My Documents.
            • Right-click on the 'log' and 'trace' folders and select Send To> Compressed (zipped) Folder.
            • Send the 2 compressed folders as attachments to this email.
            • Once complete, you can delete these compressed folders.
            Thank you in advance.
            Attached Files
            Eduardo R.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Jimmyk, 01-26-2018, 05:19 AM
            6 responses
            834 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            6 responses
            3,290 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            10 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            11 responses
            62 views
            0 likes
            Last Post halgo_boulder  
            Started by Option Whisperer, Today, 09:55 AM
            0 responses
            8 views
            0 likes
            Last Post Option Whisperer  
            Working...
            X