Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT TraceFile interpretation & UNEXPECTED status='200'

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

    NT TraceFile interpretation & UNEXPECTED status='200'

    Hi NT Experts,

    Background:
    I am using managed methods in my strategy. In this specific example my entry has 10 contracts and they got filled in this sequence: 3,3,4 (total 10 filled).

    OnOrderUpdate indicates quantity=10 and orderState=Working for both my profit taking and stoploss OCO, so I assume everything is ok.

    However stoploss only triggered for 6 contracts. I am in the midst of scrutinizing my custom log vs NT TraceFile.​ I noticed my OCO filled quantity only reach 6 in the TraceFile.

    Is there a reference somewhere to explain how to interpret TraceFile accurately?

    Essentially I need explanation on meaning of "ProcessFillEntity", "ProcessOrderVersionEntity" and "UNEXPECTED status='200'"


    TLDR: 'missing' OCO not triggering resulting in bad losses in simulation. Trying to understand NTTrace File, hope to get reference.
    Thanks!
    Last edited by elirion; 10-07-2024, 07:30 AM.

    #2
    Hello elirion,

    There is not a reference on interpreting the trace files. These are used by the NinjaTrader development and support staff to identify issues so we can help our users.

    The unexpected status 200 might be indicating the connection was interrupted after the order was submitted and the current status of the order is unknown.

    If the orders are being sent with an OCO ID string and the OCO is server side, such as with NinjaTrader Brokerage, the OCO would continue working on the exchange even if the order state is not properly reported back to NinjaTrader.

    NinjaTrader is sensitive to latency. While other applications are able to connect to the internet, it is still possible to receive disconnections if the connection has slowed. Many other applications do not receive a steady stream of data and do not require a steady connection and are not affected by latency.

    Common reasons that contribute to connection stability are:
    • Distance from local computer to the connection servers
    • Connection through a mobile hotspot (high latency)
    • Connecting through Wifi (connecting wirelessly contributes to latency)
    • Using a VPN (Virtual Private Networks may have a much lower bandwidth and will also contribute to latency)
    • ISP issues such as unstable latency
    • Hardware firewall changing IP addresses frequently
    • Dynamic IP addresses changing frequently intra-day.
      (Usually this happens once a week but you may want to check with your ISP. If they do change daily, requesting a static IP address may help.)
    • Broker/market data servers may be experiencing temporary downtime, such as scheduled weekend maintenance
    ​To troubleshoot this, I recommend the following steps:
    • Unplug your internet modem, and (if a separate device) router for at least 60 seconds, and also restart the Computer
    • Ensure exceptions have been added into any firewall/antivirus/backup programs for the (My) Documents/NinjaTrader 8 folder
    • Ensure you are using the latest release of NinjaTrader
    • If you are not already and the option is available to you, I highly recommend connecting to the internet using an ethernet cable. Wireless connections are significantly more unreliable
    • Ensure that your computer is not allowed to sleep (enter standby) or hibernate
    • Ensure that your computer is not turning off your Network Adapter to conserve power:
      • Right-click on your Start button
      • Select 'Device Manager'
      • Expand 'Network Adapters'
      • Right-click on your Network Adapter and select Properties > Power Management
      • Uncheck 'Allow the computer to turn off this device to save power' option
      • Click 'OK' to save the changes
      • Do this for all Network Adapters
    • Disconnect from a VPN if connected (Virtual Private Network)
    • Clear your DNS
    • If the above steps do not help, contact your ISP and let them know you are experiencing a highly unstable connection. An issue of connectivity may exist on their end
    • If your ISP is unable to resolve the issue from there, consider looking into a Virtual Private Server (VPS) to run NinjaTrader on. This will provide a strong and uninterrupted connection to the appropriate data servers
    If questions come up, please let us know.​
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks so much....
      I will try your steps. I am half a world away from the US and latency could definitely be a culprit.

      By the way, my broker is Tradovate. Can I assume the behavior will be identical to that of Ninjatrader brokerage ?

      And lastly can i say i should aim to eliminate status200 as much as possible ? I got a few appearing here and there.

      you guys are really top notched in your knowledge

      Comment


        #4
        Hello elirion,

        From my understanding Tradovate uses server side OCO.

        Using a VPS located near the brokerage servers in Chicago should resolve the errors.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          by the way, is there anyway to trap status200 string (or any other returns found in the trace file) in my main strategy code ? Thinking of writing all of them into a separate log file.

          Comment


            #6
            Hello elirion,

            The error may update OnOrderUpdate() with the error code and message depending on the source of the order.

            protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string comment)

            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              x10 appreciate your help

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Today, 05:17 AM
              0 responses
              53 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
              70 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