Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Realtime TraceOrders

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

    NT8 Realtime TraceOrders

    NT Team,

    I am attempting output trace information for Realtime trades only.

    The NT8 help guide TraceOrders can be used to output trace information.

    Setting TraceOrders as true in State.Realtime (as opposed to State.SetDefaults) results in unexpected outputs.
    Code:
    else if (State == State.Realtime)
    {
      TraceOrders = true;
    }
    Please advise how to output trace information for Realtime trades only.

    Thanks
    Shannon
    Attached Files

    #2
    Hello,

    Thank you for the post.

    TraceOrders specifically would need to be set in the state shown in the example for the expected results.

    As far using this in only realtime, unfortunately there are no ways that I know of that would allow this. I will put in a feature request for this item or to allow choosing if historical is included.

    You could also Print when the State.Transition occurs or State.Realtime to see a break in the output window.

    You can print the order information from the OnOrderUpdate and OnExecution overrides to learn more about the orders, but if you are looking for the managed errors unfortunately this would not help.



    I look forward to being of further assistance.
    Last edited by NinjaTrader_Jesse; 10-05-2016, 03:57 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse,

      Thanks for submitting the feature request.

      Shannon

      Comment


        #4
        Hello,

        I just wanted to reply back on this item.

        I forgot we have added an overload that intercepts the prints for the TraceOrders. You can also use the State system with this overload, here is a simple example:
        .
        Code:
        protected override void OnStateChange()
        {
        	if (State == State.SetDefaults)
        	{
        		TraceOrders = true;
        	}
        }
        
        protected override void OnOrderTrace(DateTime timestamp, string message)
        {
         	if(State == State.Realtime)
        	{
        		Print(string.Format("REALTIME Time: {0} Message: {1}", timestamp, message));	
        	} 
        	else if(State == State.Historical)
        	{
        		Print(string.Format("HISTORICAL Time: {0} Message: {1}", timestamp, message));	
        	}
        }


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by samish18, Today, 11:26 AM
        0 responses
        1 view
        0 likes
        Last Post samish18  
        Started by Trader146, 03-29-2024, 01:22 PM
        2 responses
        14 views
        0 likes
        Last Post Trader146  
        Started by tsantospinto, 04-12-2024, 07:04 PM
        7 responses
        127 views
        0 likes
        Last Post aligator  
        Started by futtrader, 04-21-2024, 01:50 AM
        5 responses
        56 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by PeakTry, Today, 10:49 AM
        0 responses
        2 views
        0 likes
        Last Post PeakTry
        by PeakTry
         
        Working...
        X