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 Karado58, 11-26-2012, 02:57 PM
        8 responses
        14,828 views
        0 likes
        Last Post Option Whisperer  
        Started by Option Whisperer, Today, 09:05 AM
        0 responses
        1 view
        0 likes
        Last Post Option Whisperer  
        Started by cre8able, Yesterday, 01:16 PM
        3 responses
        11 views
        0 likes
        Last Post cre8able  
        Started by Harry, 05-02-2018, 01:54 PM
        10 responses
        3,204 views
        0 likes
        Last Post tharton3  
        Started by ChartTourist, Today, 08:22 AM
        0 responses
        6 views
        0 likes
        Last Post ChartTourist  
        Working...
        X