Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Log Tab doesn't show items in the order of being created

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

    Log Tab doesn't show items in the order of being created

    in NinjaTrader 8.0.0.12,
    see the test code:

    Code:
            protected override void OnBarUpdate()
            {
                var curThreadId = Thread.CurrentThread.ManagedThreadId;
                var dispatcherThreadId = this.Dispatcher.Thread.ManagedThreadId;
                var isInUIThread = (curThreadId == dispatcherThreadId);
    
                Log(string.Format("Thread{1}: I am {0}in UI thread. CurrentBar={2}, Count={3}", isInUIThread ? "" : "NOT ", curThreadId, this.CurrentBar, this.Count), LogLevel.Error);
            }
    and see the Log tab shows, the CurrentBar number is out of order:
    Click image for larger version

Name:	LogTab.png
Views:	1
Size:	59.5 KB
ID:	905667

    If replace Log() with Print(), the order is correct:
    Click image for larger version

Name:	OutputWindow.png
Views:	1
Size:	29.0 KB
ID:	905668

    By the way, I checked the log file under my document\ninjatrader8 path, the order is correct. So I guess it's the Log Tab's bug to show items withou sync with the log file.
    Last edited by jjhou; 08-10-2016, 10:09 PM.

    #2
    Hello jjhou,

    Thank you for your note about this.

    I am inquiring with NT Development if messages to the Log should be in order (or synchronous).

    I appreciate your patience.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello jjhou,

      Our development has let me know that the Log tab itself does update asynchronously even though calling Log() in a script sends the logs in order.

      The Log tab itself does not have millisecond granularity. This means that when the Log tab updates with queued log messages, any messages that happened in the same second may be out of order. (The granularity is only to the second)

      I've submitted a feature request on your behalf to have messages in the log appear in order.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hello jjhou,

        Your feature request to have messages from a script appear in order in the log is being tracked with ID# SFT-1549.

        We appreciate your feedback.

        Please let us know of any other requests or suggestions you have for the NinjaTrader platform.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mestor, 03-10-2023, 01:50 AM
          16 responses
          388 views
          0 likes
          Last Post z.franck  
          Started by rtwave, 04-12-2024, 09:30 AM
          4 responses
          31 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Working...
          X