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 philmg, Today, 01:17 PM
        0 responses
        2 views
        0 likes
        Last Post philmg
        by philmg
         
        Started by cre8able, Today, 01:01 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by manitshah915, Today, 12:59 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by ursavent, Today, 12:54 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by Mizzouman1, Today, 07:35 AM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X