Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Phantom trades due to repricing since update of LogForJ Problem

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

    Phantom trades due to repricing since update of LogForJ Problem

    Hello,

    we are running automated strategies and since the major NT update for IB all went fine until the updates due to the LogForJ security issues.
    Since then we experiencing problems like unexpected IB Gateway shutdowns, every 2-3 weeks and "phantom trades", which did not happen before.
    Please see attached screenshots.

    1st of all: could you tell us: what are the latest and tested versions of NT8 working with IB Gateway or TWS versions?

    2nd: the Error we are getting is: "Warning your order was repriced so as not to cross a related resting order". What does it mean exactly? Because we can see the working trade in the chart
    but the is no position. The executions tab looks ok. We looked into the Orders tab and could not find any active order. Maybe you can see something here which we don't.



    Click image for larger version  Name:	image1.jpeg Views:	0 Size:	525.7 KB ID:	1194078
    Here you can see the trades of today. We are wondering about the 2nd market order since we are only using limit orders.






    Click image for larger version  Name:	image0.jpeg Views:	0 Size:	516.8 KB ID:	1194076

    The execution seems to be good.
    But again we only received the error "Warning your order was repriced so as not to cross a related resting order". And all trades were not executed after the 1st Warning. Means
    we could not see any open postion.

    Any Idea what's wrong ?
    PS the strategy code was not touched for the past year....
    And we are running this strategy on two different cloud servers and received these warnings on both.


    Thanks




    Last edited by fernlicht; 03-16-2022, 04:26 AM.

    #2
    After restarting NT8 (not IB) we had a new trade which was working as expected.

    I just thought if we should the cancelallorders command before entering a new order?
    Last edited by fernlicht; 03-16-2022, 05:37 AM.

    Comment


      #3
      Hello fernlicht,

      Thanks for your post.

      "what are the latest and tested versions of NT8 working with IB Gateway or TWS versions"

      The most recent version of NinjaTrader 8 is 8.0.25.0. You could see the supported version of IB Gateway or TWS in the Connection Guide linked below. From the Connection Guide, the supported version of IB Gateway is IB Gateway 981.3i and the supported version of TWS is TWS 981.3i.

      Interactive Brokers Connection Guide: https://ninjatrader.com/ConnectionGu...nnection-Guide

      In regard to the error message, "Warning your order was repriced so as not to cross a related resting order", please write in to ScriptingSupport[AT]ninjatrader.com with your Log and Trace files attached to your email so that we may investigate this further. Also, please include the Order ID numbers of the 'phantom orders' in question.

      In the subject of the email, please include "ATTN: Brandon H" and ticket number 3530908. In the body of the email include a link to this forum thread.

      Follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
      • Open the Windows File Explorer (hotkey = Windows key + E) Then navigate to "Documents" > Open the "NinjaTrader 7/8" folder
      • 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.

      I look forward to assisting further.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment


        #4
        Ok thanks, will do it within the next few working days.

        Comment


          #5
          BTW. is there a chance to catch this error or warning by code?
          -> "Warning your order was repriced so as not to cross a related resting order".

          Comment


            #6
            Hello fernlicht,

            Thanks for your note.

            You would only be able to trap this error if the order is a rejection.

            You could use RealtimeErrorHandling to determine the behavior of a strategy when the strategy places an order that is returned "Rejected". The default behavior is to stop the strategy, cancel any remaining working orders, and then close any open positions.

            RealtimeErrorHandling could be set to IgnoreAllErrors to ignore any order errors received or StopCancelCloseIgnoreRejects to perform the default strategy behavior on all errors except order rejections. Please note that setting this property value to IgnoreAllErrors can have serious adverse affects on a running strategy unless you have programmed your own order rejection handling in the OnOrderUpdate() method.

            To do this you could trap the rejected order by checking if the OrderState is Rejected within OnOrderUpdate() followed by defining your own order rejection handling behavior for the rejected order.

            Please see the example in the help guide link below that demonstrates using RealtimeErrorHandling and trapping a rejected order in OnOrderUpdate().

            RealtimeErrorHandling — https://ninjatrader.com/es/support/h...orhandling.htm

            Let us know if we may assist further.
            <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

            Comment


              #7
              Ok, thanks will try out and investigate before taking your time. thx

              Comment


                #8
                A little update, we've coded a snipped which looks if there is an open order (active or accepted) , before taking the next signal/trade and closing all orders (if any).
                Since then we had no more incidents, but the old code cached a few errors/warnings during that small period.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Yesterday, 05:17 AM
                0 responses
                54 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                130 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                71 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                44 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                49 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X