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 geddyisodin, Yesterday, 05:20 AM
        7 responses
        45 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by gbourque, Today, 06:39 AM
        2 responses
        5 views
        0 likes
        Last Post gbourque  
        Started by cre8able, Yesterday, 07:24 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cocoescala, 10-12-2018, 11:02 PM
        6 responses
        939 views
        0 likes
        Last Post Jquiroz1975  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X