Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Read + parse order history with NT?

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

    Read + parse order history with NT?

    I'm currently running several automated trading platforms. All of them write their order history into a file. These files are used for platform/strategy-monitoring and reporting purposes. Now I'm trying to do the same thing with NT.

    I'm intending to run several strategies, each of them on several markets itself. Is it possible to access the whole history of executed trades?

    Is it possible to retrieve the close price, i.e. of trades closed by the broker (trades with stoploss/profit target)?

    Is it possible to retrieve the commissions that were applied to the trade by the broker?
    Same question for swaps (when trading FX)?

    I couldn't find precise answers on these questions in the documentation. It seems like I'm reaching the limitations of the underlying model of NT - or maybe I'm misunderstanding the scope of NT.

    Thank you in advance for you help.

    #2
    Hello,

    Thanks for the note.

    You would not be able to access the order information on an accounts level. Only order information from the strategy itself. If the strategy executed the order then you can use this information by outputing it to .txt.

    Your only other option I can think of is to parse the My Documents->NinjaTrader 7->logs.txt file. All orders and there positions/account execution reports are located here. However its only for that day only and you would have to parse it to get the information you needed out of that file.

    Let me know if I can be of further assistance.

    Comment


      #3
      Dump of open order parameters needed

      Originally posted by NinjaTrader_Brett View Post
      Hello,

      Thanks for the note.

      You would not be able to access the order information on an accounts level. Only order information from the strategy itself. If the strategy executed the order then you can use this information by outputing it to .txt.

      Your only other option I can think of is to parse the My Documents->NinjaTrader 7->logs.txt file. All orders and there positions/account execution reports are located here. However its only for that day only and you would have to parse it to get the information you needed out of that file.

      Let me know if I can be of further assistance.
      Hi Brett, What is the recommended way of getting all orders executed by a strategy into a log file (e.g. .csv) suitable for further processing? Do you have any code samples?

      Best

      John

      Comment


        #4
        Originally posted by ninjohn View Post
        Hi Brett, What is the recommended way of getting all orders executed by a strategy into a log file (e.g. .csv) suitable for further processing? Do you have any code samples?

        Best

        John
        Using the Account Performance Tab, generate the results for the time you want to examine.
        Go to the Trades tab in the report sections
        Export the Grid to Excel, by right-clicking and using the resulting popup menu.
        Attached Files
        Last edited by koganam; 12-25-2011, 03:58 AM.

        Comment


          #5
          So there's no way to dump it automatically from within the strategy?

          Comment


            #6
            Originally posted by ninjohn View Post
            So there's no way to dump it automatically from within the strategy?
            Not unless you want to write your own file, which is updated everytime you have an execution of the type that you want to monitor. That probably means that you have to use a StreamWriter.

            ref: http://www.ninjatrader.com/support/f...ead.php?t=3475

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by timmbbo, Today, 08:59 AM
            1 response
            2 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by KennyK, 05-29-2017, 02:02 AM
            2 responses
            1,279 views
            0 likes
            Last Post marcus2300  
            Started by fernandobr, Today, 09:11 AM
            0 responses
            2 views
            0 likes
            Last Post fernandobr  
            Started by itrader46, Today, 09:04 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by bmartz, 03-12-2024, 06:12 AM
            5 responses
            33 views
            0 likes
            Last Post NinjaTrader_Zachary  
            Working...
            X