• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 02: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));	
        	}
        }
        http://ninjatrader.com/support/helpG...ub=traceorders

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Option Whisperer, 12-07-2019, 11:50 AM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Jim  
        Started by Jakub, Yesterday, 11:52 AM
        2 responses
        19 views
        0 likes
        Last Post Jakub
        by Jakub
         
        Started by Johnny Santiago, Today, 07:06 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Started by HiddenPhilosopher, Today, 04:37 AM
        1 response
        24 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Started by aprendiz, Today, 06:44 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Jim  
        Working...
        X