Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I match buy and sell rows (txns) under Executions Tab?

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

    How can I match buy and sell rows (txns) under Executions Tab?

    Hi,
    When I run a multi-instrument strategy in strategy analyzer, I can see list of all buys and sells under Executions Tab. I would like to export that table to a spreadsheet and do some additional processing.

    The issue I am running into is how to match the sell rows with buy rows under Executions tab i.e., which sell transaction corresponds to which buy transaction. I don't see any common ID or key that connects buys and sells.

    Questions:
    (a) How can I match the buy and sell executions in Executions Tab?
    (b) How does ninjatrader currently match executions to come up with list of Trades under "Trades tab?

    Regards

    #2
    atrader,

    How does your strategy work? Does it use only one set of entrance / exit conditions or does it sometimes use more than one set?
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Hi Adam -
      The strategy is basically a multi-instrument and multi-time frame strategy. For example like a Sector Rotation strategy with entries in a different (lower) time frame. Don't know if this is the information you are looking for. Eventually I would like to incorporate scale in - scale out logic for entries & exits.

      It seems somehow ninjatrader matches the buy and sell executions but I cannot figure out how it is doing internally.

      Regards

      Comment


        #4
        Hello,

        The order ID's will be changing in the executions tab, however you may be able to link these orders together better if you use a signal name, however this isn't accessible in the Executions tab.

        So far the only other best solution I have here is to match by entry/exit time. Generally an order entrance is followed by its next most recent exit but it can get more complicated if you use signal names. With scaling in/out you may be able to take advantage of the entry/exit times however.

        I.e. enter long position One, enter another long position Two, exit a long position and it will be Two, exit another long position and it will be One. In this case the times of each action will be sequenced one after another in time.

        Alternatively you could also have your strategy output this information to a CSV file by using some of the file IO commands, then you could load this CSV file into excel using your own formatting rules.

        I will forward the suggestion that we add a better way to link these orders in the Executions tab to our development team.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Hi Adam -
          Matching entry/exit time may not work as the orders generated by the strategy can be on different symbols i.e., buy X, buy Y, sell Y, buy X. Looks like I have no choice but to write custom order tracking and matching logic in the strategy and write to a csv file. That's lot of work...

          Anyway, as part of your suggestion forward, another suggestion that might be useful is to expose the NT platform/backend APIs that ninjatrader UI uses. This will solve for advanced users multiple NT limitations like the above issue, ability to write strategies on watchlists, plugin their own performance metrics etc.

          Comment


            #6
            Your suggestions have ID's #1993 and #1994 respectively.

            You can export the trades tab that is already tallied if that is sufficient, otherwise these suggestions are for the executions tab and your suggestion to expose the gui elements.
            Adam P.NinjaTrader Customer Service

            Comment


              #7
              Thanks. I exported the trades tab and used that to create transactions (executions) table with my own UID. That seems to take care of the problem.

              Comment


                #8
                Originally posted by NinjaTrader_AdamP View Post
                Hello,

                The order ID's will be changing in the executions tab, however you may be able to link these orders together better if you use a signal name, however this isn't accessible in the Executions tab.

                So far the only other best solution I have here is to match by entry/exit time. Generally an order entrance is followed by its next most recent exit but it can get more complicated if you use signal names. With scaling in/out you may be able to take advantage of the entry/exit times however.

                I.e. enter long position One, enter another long position Two, exit a long position and it will be Two, exit another long position and it will be One. In this case the times of each action will be sequenced one after another in time.

                Alternatively you could also have your strategy output this information to a CSV file by using some of the file IO commands, then you could load this CSV file into excel using your own formatting rules.

                I will forward the suggestion that we add a better way to link these orders in the Executions tab to our development team.
                Hi. It is just I'm finding and I need!! How about "I will forward the suggestion that we add a better way to link these orders in the Executions tab to our development team"? It lokks like ID # 1993 or # 1994 suggestion!! Thanks in advance!! (P.D: I'm working with NinjaTrader 8, not Ninja Trader 7)

                Comment


                  #9
                  Sorry,

                  Hi. It is just I'm searching and I need!! How about "I will forward the suggestion that we add a better way to link these orders in the Executions tab to our development team"? It lokks like ID # 1993 or # 1994 suggestion!! Thanks in advance!! (P.D: I'm working with NinjaTrader 8, not Ninja Trader 7)

                  Comment


                    #10
                    Hello JoseFRS,

                    Please note that this forum thread is almost 9 years old.

                    The Control Center-->Orders-tab-->ID column shows the same value as the Control Center-->Executions-tab-->Order ID column in NinjaTrader 8.
                    JasonNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by f.saeidi, Today, 12:14 PM
                    4 responses
                    11 views
                    0 likes
                    Last Post f.saeidi  
                    Started by Russ Moreland, Today, 12:54 PM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Erick  
                    Started by philmg, Today, 12:55 PM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_ChristopherJ  
                    Started by TradeForge, 04-19-2024, 02:09 AM
                    2 responses
                    32 views
                    0 likes
                    Last Post TradeForge  
                    Started by aprilfool, 12-03-2022, 03:01 PM
                    3 responses
                    329 views
                    0 likes
                    Last Post NinjaTrader_Adrian  
                    Working...
                    X